hexsha string | size int64 | ext string | lang string | max_stars_repo_path string | max_stars_repo_name string | max_stars_repo_head_hexsha string | max_stars_repo_licenses list | max_stars_count int64 | max_stars_repo_stars_event_min_datetime string | max_stars_repo_stars_event_max_datetime string | max_issues_repo_path string | max_issues_repo_name string | max_issues_repo_head_hexsha string | max_issues_repo_licenses list | max_issues_count int64 | max_issues_repo_issues_event_min_datetime string | max_issues_repo_issues_event_max_datetime string | max_forks_repo_path string | max_forks_repo_name string | max_forks_repo_head_hexsha string | max_forks_repo_licenses list | max_forks_count int64 | max_forks_repo_forks_event_min_datetime string | max_forks_repo_forks_event_max_datetime string | content string | avg_line_length float64 | max_line_length int64 | alphanum_fraction float64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
83abbefa23f1ae359f56445c0f2ce1bf92c044fe | 25,176 | js | JavaScript | usr/share/roundcube/program/js/tinymce/langs/ug.min.js | jmkristian/mail-server-configuration | 29c9c978931d0f1ab856b830c020a177f346c3aa | [
"Apache-2.0"
] | null | null | null | usr/share/roundcube/program/js/tinymce/langs/ug.min.js | jmkristian/mail-server-configuration | 29c9c978931d0f1ab856b830c020a177f346c3aa | [
"Apache-2.0"
] | null | null | null | usr/share/roundcube/program/js/tinymce/langs/ug.min.js | jmkristian/mail-server-configuration | 29c9c978931d0f1ab856b830c020a177f346c3aa | [
"Apache-2.0"
] | null | null | null | tinymce.addI18n("ug",{Redo:"\u0642\u0627\u064a\u062a\u0627 \u0642\u0649\u0644\u0649\u0634",Undo:"\u0626\u0627\u0631\u0642\u0649\u063a\u0627 \u064a\u06d0\u0646\u0649\u0634",Cut:"\u0643\u06d0\u0633\u0649\u0634",Copy:"\u0643\u06c6\u0686\u06c8\u0631\u06c8\u0634",Paste:"\u0686\u0627\u067e\u0644\u0627\u0634","Select all":"\u06be\u06d5\u0645\u0645\u0649\u0646\u0649 \u062a\u0627\u0644\u0644\u0627\u0634","New document":"\u064a\u06d0\u06ad\u0649 \u067e\u06c8\u062a\u06c8\u0643",Ok:"\u062c\u06d5\u0632\u0649\u0645\u0644\u06d5\u0634",
Cancel:"\u0642\u0627\u0644\u062f\u06c7\u0631\u06c7\u0634","Visual aids":"\u0626\u06d5\u0633\u0643\u06d5\u0631\u062a\u0649\u0634",Bold:"\u062a\u0648\u0645",Italic:"\u064a\u0627\u0646\u062a\u06c7",Underline:"\u0626\u0627\u0633\u062a\u0649 \u0633\u0649\u0632\u0649\u0642",Strikethrough:"\u0626\u06c6\u0686\u06c8\u0631\u06c8\u0634 \u0633\u0649\u0632\u0649\u0642\u0649",Superscript:"\u0626\u06c8\u0633\u062a\u06c8\u0646\u0643\u0649 \u0628\u06d5\u0644\u06af\u06d5",Subscript:"\u0626\u0627\u0633\u062a\u0649\u0646\u0642\u0649 \u0628\u06d5\u0644\u06af\u06d5",
"Clear formatting":"\u0641\u0648\u0631\u0645\u0627\u062a\u0646\u0649 \u062a\u0627\u0632\u0644\u0627\u0634","Align left":"\u0633\u0648\u0644\u063a\u0627 \u062a\u0648\u063a\u0631\u0649\u0644\u0627\u0634","Align center":"\u0645\u06d5\u0631\u0643\u06d5\u0632\u06af\u06d5 \u062a\u0648\u063a\u06c7\u0631\u0644\u0627\u0634","Align right":"\u0626\u0648\u06ad\u063a\u0627 \u062a\u0648\u063a\u06c7\u0631\u0644\u0627\u0634",Justify:"\u0626\u0649\u0643\u0643\u0649 \u064a\u0627\u0646\u063a\u0627 \u062a\u0648\u063a\u06c7\u0631\u0644\u0627\u0634",
"Bullet list":"\u0628\u06d5\u0644\u06af\u06d5 \u062a\u0649\u0632\u0649\u0645\u0644\u0649\u0643","Numbered list":"\u0633\u0627\u0646\u0644\u0649\u0642 \u062a\u0649\u0632\u0649\u0645\u0644\u0649\u0643","Decrease indent":"\u0626\u0627\u0644\u062f\u0649\u063a\u0627 \u0633\u06c8\u0631\u06c8\u0634","Increase indent":"\u0643\u06d5\u064a\u0646\u0649\u06af\u06d5 \u0633\u06c8\u0631\u06c8\u0634",Close:"\u062a\u0627\u0642\u0627\u0634",Formats:"\u0641\u0648\u0631\u0645\u0627\u062a","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"\u0633\u0649\u0632\u0646\u0649\u06ad \u062a\u0648\u0631 \u0643\u06c6\u0631\u06af\u06c8\u0686\u0649\u06ad\u0649\u0632 \u0642\u0649\u064a\u0649\u067e \u0686\u0627\u067e\u0644\u0627\u0634 \u062a\u0627\u062e\u062a\u0649\u0633\u0649 \u0632\u0649\u064a\u0627\u0631\u06d5\u062a \u0642\u0649\u0644\u0649\u0634\u0646\u0649 \u0642\u0648\u0644\u0644\u0649\u0645\u0627\u064a\u062f\u06c7. Ctrl+X/C/V \u062a\u06d0\u0632\u0644\u06d5\u062a\u0645\u06d5 \u0643\u06c7\u0646\u06c7\u067e\u0643\u0649\u0633\u0649 \u0626\u0627\u0631\u0642\u0649\u0644\u0649\u0642 \u0643\u06d0\u0633\u0649\u067e \u0686\u0627\u067e\u0644\u0627\u0634 \u0645\u06d5\u0634\u063a\u06c7\u0644\u0627\u062a\u0649 \u0642\u0649\u0644\u0649\u06ad.",
Headers:"\u0628\u06d0\u0634\u0649","Header 1":"\u062a\u06d0\u0645\u0627 1","Header 2":"\u062a\u06d0\u0645\u0627 2","Header 3":"\u062a\u06d0\u0645\u0627 3","Header 4":"\u062a\u06d0\u0645\u0627 4","Header 5":"\u062a\u06d0\u0645\u0627 5","Header 6":"\u062a\u06d0\u0645\u0627 6",Headings:"\u0645\u0627\u06cb\u0632\u06c7","Heading 1":"1 \u062f\u06d5\u0631\u0649\u062c\u0649\u0644\u0649\u0643 \u0645\u0627\u06cb\u0632\u06c7","Heading 2":"2 \u062f\u06d5\u0631\u0649\u062c\u0649\u0644\u0649\u0643 \u0645\u0627\u06cb\u0632\u06c7",
"Heading 3":"3 \u062f\u06d5\u0631\u0649\u062c\u0649\u0644\u0649\u0643 \u0645\u0627\u06cb\u0632\u06c7","Heading 4":"4 \u062f\u06d5\u0631\u0649\u062c\u0649\u0644\u0649\u0643 \u0645\u0627\u06cb\u0632\u06c7","Heading 5":"5 \u062f\u06d5\u0631\u0649\u062c\u0649\u0644\u0649\u0643 \u0645\u0627\u06cb\u0632\u06c7","Heading 6":"6 \u062f\u06d5\u0631\u0649\u062c\u0649\u0644\u0649\u0643 \u0645\u0627\u06cb\u0632\u06c7",Div:"Div",Pre:"Pre",Code:"\u0643\u0648\u062f",Paragraph:"\u067e\u0627\u0631\u0627\u06af\u0649\u0631\u0627 \u0641",
Blockquote:"\u0626\u06d5\u0633\u0643\u06d5\u0631\u062a\u0649\u0634",Inline:"\u0626\u0649\u0686\u0643\u0649",Blocks:"\u0631\u0627\u064a\u0648\u0646","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"\u06be\u0627\u0632\u0649\u0631 \u0686\u0627\u067e\u0644\u0649\u0633\u0649\u06ad\u0649\u0632 \u0633\u0627\u067e \u062a\u06d0\u0643\u0649\u0634 \u0645\u06d5\u0632\u0645\u06c7\u0646\u0649 \u0686\u0627\u067e\u0644\u0649\u0646\u0649\u062f\u06c7. \u062a\u06d0\u0643\u0649\u0634 \u0634\u06d5\u0643\u0644\u0649\u062f\u06d5 \u0686\u0627\u067e\u0644\u0627\u0634 \u062a\u06d5\u06ad\u0634\u0649\u0643\u0649\u0646\u0649 \u062a\u0627\u0642\u0649\u06cb\u06d5\u062a\u0643\u06d5\u0646\u06af\u06d5 \u0642\u06d5\u062f\u06d5\u0631.",
"Font Family":"\u062e\u06d5\u062a \u0646\u06c7\u0633\u062e\u0649\u0633\u0649","Font Sizes":"\u062e\u06d5\u062a \u0686\u0648\u06ad\u0644\u06c7\u0642\u0649",Class:"\u062a\u06c8\u0631","Browse for an image":"\u0631\u06d5\u0633\u0649\u0645\u0646\u0649 \u0643\u06c6\u0631\u0633\u0649\u062a\u0649\u0634",OR:"\u064a\u0627\u0643\u0649","Drop an image here":"\u0628\u06c7 \u064a\u06d5\u0631\u062f\u0649\u0643\u0649 \u0631\u06d5\u0633\u0649\u0645\u0646\u0649 \u0626\u06c6\u0686\u06c8\u0631\u06c8\u0634",Upload:"\u0686\u0649\u0642\u0649\u0631\u0649\u0634",
Block:"\u067e\u0627\u0631\u0686\u06d5",Align:"\u062a\u0648\u063a\u0631\u0649\u0644\u0649\u0646\u0649\u0634\u0649",Default:"\u0633\u06c8\u0643\u06c8\u062a",Circle:"\u0686\u06d5\u0645\u0628\u06d5\u0631",Disc:"\u062f\u06d0\u0633\u0643\u0627",Square:"\u0643\u06cb\u0627\u062f\u0631\u0627\u062a","Lower Alpha":"\u0626\u0649\u0646\u06af\u0649\u0644\u0649\u0632\u0686\u06d5 \u0643\u0649\u0686\u0649\u0643 \u064a\u06d0\u0632\u0649\u0644\u0649\u0634\u0649","Lower Greek":"\u06af\u0631\u06d0\u062a\u0633\u0649\u064a\u0649\u0686\u06d5 \u0643\u0649\u0686\u0649\u0643 \u064a\u06d0\u0632\u0649\u0644\u0649\u0634\u0649",
"Lower Roman":"\u0631\u0649\u0645\u0686\u06d5 \u0643\u0649\u0686\u0649\u0643 \u064a\u06d0\u0632\u0649\u0644\u0649\u0634\u0649","Upper Alpha":"\u0626\u0649\u0646\u06af\u0649\u0644\u0649\u0632\u0686\u06d5 \u0686\u0648\u06ad \u064a\u06d0\u0632\u0649\u0644\u0649\u0634\u0649","Upper Roman":"\u0631\u0649\u0645\u0686\u06d5 \u0686\u0648\u06ad \u064a\u06d0\u0632\u0649\u0644\u0649\u0634\u0649",Anchor:"\u0626\u06c7\u0644\u0627\u0646\u0645\u0627",Name:"\u0646\u0627\u0645\u0649",Id:"Id","Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"ID \u0686\u0648\u0642\u06c7\u0645 \u06be\u06d5\u0631\u0649\u067e \u0628\u0649\u0644\u06d5\u0646 \u0628\u0627\u0634\u0644\u0649\u0646\u0649\u0634\u0649 \u0643\u06d0\u0631\u06d5\u0643 \u060c \u0626\u0627\u0631\u0642\u0649\u0633\u0649 \u067e\u06d5\u0642\u06d5\u062a \u06be\u06d5\u0631\u0649\u067e \u060c \u0633\u0627\u0646 \u060c \u0626\u0627\u064a\u0631\u0649\u0634 \u0628\u06d5\u0644\u06af\u0649\u0633\u0649 \u060c \u0686\u0649\u0643\u0649\u062a \u06cb\u06d5 \u0626\u0627\u0633\u062a\u0649 \u0633\u0649\u0632\u0649\u0642\u0649 \u062f\u0649\u0646 \u0626\u0649\u0628\u0627\u0631\u06d5\u062a .",
"You have unsaved changes are you sure you want to navigate away?":"\u0633\u0649\u0632 \u062a\u06d0\u062e\u0649 \u0645\u06d5\u0632\u0645\u06c7\u0646\u0646\u0649 \u0633\u0627\u0642\u0644\u0649\u0645\u0649\u062f\u0649\u06ad\u0649\u0632\u060c \u0626\u0627\u064a\u0631\u0649\u0644\u0627\u0645\u0633\u0649\u0632\u061f","Restore last draft":"\u0626\u0627\u062e\u0649\u0631\u0642\u0649 \u0643\u06c7\u067e\u0649\u064a\u0649\u06af\u06d5 \u0642\u0627\u064a\u062a\u0649\u0634","Special character":"\u0626\u0627\u0644\u0627\u06be\u0649\u062f\u06d5 \u0628\u06d5\u0644\u06af\u0649\u0644\u06d5\u0631",
"Source code":"\u0626\u06d5\u0633\u0644\u0649 \u0643\u0648\u062f\u0649","Insert/Edit code sample":"\u0643\u0648\u062f \u0645\u0649\u0633\u0627\u0644\u0649\\\u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634",Language:"\u062a\u0649\u0644","Code sample":"\u0643\u0648\u062f \u0645\u0649\u0633\u0627\u0644\u0649",Color:"\u0631\u06d5\u06ad",R:"R",G:"G",B:"B","Left to right":"\u0633\u0648\u0644\u062f\u0649\u0646 \u0626\u0648\u06ad\u063a\u0627 ","Right to left":"\u0626\u0648\u06ad\u062f\u0649\u0646 \u0633\u0648\u0644\u063a\u0627",
Emoticons:"\u0686\u0649\u0631\u0627\u064a \u0626\u0649\u067e\u0627\u062f\u06d5","Document properties":"\u06be\u06c6\u062c\u062c\u06d5\u062a \u062e\u0627\u0633\u0644\u0649\u0642\u0649",Title:"\u062a\u06d0\u0645\u0627",Keywords:"\u06be\u0627\u0644\u0642\u0649\u0644\u0649\u0642 \u0633\u06c6\u0632",Description:"\u062a\u06d5\u0633\u0649\u06cb\u0649\u0631",Robots:"\u0645\u0627\u0634\u0649\u0646\u0627 \u0626\u0627\u062f\u06d5\u0645",Author:"\u0626\u06c7\u0644\u0627\u0646\u0645\u0627",Encoding:"\u0643\u0648\u062f\u0644\u0627\u0634",
Fullscreen:"\u067e\u06c8\u062a\u06c8\u0646 \u0626\u06d0\u0643\u0631\u0627\u0646",Action:"\u06be\u06d5\u0631\u0649\u0643\u06d5\u062a",Shortcut:"\u0642\u0649\u0633\u0642\u0627 \u064a\u0648\u0644",Help:"\u064a\u0627\u0631\u062f\u06d5\u0645",Address:"\u0626\u0627\u062f\u0649\u0631\u0649\u0633","Focus to menubar":"\u062a\u0649\u0632\u0649\u0645\u0644\u0649\u0643 \u0633\u0649\u062a\u0648\u0646\u0649\u063a\u0627 \u062f\u0649\u0642\u06d5\u062a","Focus to toolbar":"\u0642\u06c7\u0631\u0627\u0644 \u0633\u0649\u062a\u0648\u0646\u0649\u063a\u0627 \u062f\u0649\u0642\u06d5\u062a",
"Focus to element path":"\u0626\u06d0\u0644\u0649\u0645\u0649\u0646\u062a\u0644\u0627\u0631 \u064a\u0648\u0644\u0649\u063a\u0627 \u062f\u0649\u0642\u06d5\u062a","Focus to contextual toolbar":"\u0643\u0648\u0646\u062a\u06d0\u0643\u0649\u0633\u062a \u0642\u0648\u0631\u0627\u0644 \u0626\u0649\u0633\u062a\u0648\u0646\u0649\u063a\u0627 \u062f\u06d0\u0642\u06d5\u062a","Insert link (if link plugin activated)":"\u0626\u06c7\u0644\u0627\u0646\u0645\u0627 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u06ad (\u0626\u06c7\u0644\u0627\u0646\u0645\u0627 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634 \u0642\u0649\u0633\u062a\u06c7\u0631\u0645\u0649\u0633\u0649\u0646\u0649 \u0642\u0648\u0632\u063a\u0627\u062a\u0642\u0627\u0646 \u0626\u06d5\u06be\u06cb\u0627\u0644\u062f\u0627)",
"Save (if save plugin activated)":"\u0633\u0627\u0642\u0644\u0627\u0634 (\u0633\u0627\u0642\u0644\u0627\u0634 \u0642\u0649\u0633\u062a\u06c7\u0631\u0645\u0649\u0633\u0649\u0646\u0649 \u0642\u0648\u0632\u063a\u0627\u062a\u0642\u0627\u0646 \u0626\u06d5\u06be\u06cb\u0627\u0644\u062f\u0627)","Find (if searchreplace plugin activated)":"\u0626\u0649\u0632\u062f\u06d5\u0634 (\u0626\u0649\u0632\u062f\u06d5\u0634 \u0642\u0649\u0633\u062a\u06c7\u0631\u0645\u0649\u0633\u0649 \u0642\u0648\u0632\u063a\u0649\u062a\u0649\u0644\u063a\u0627\u0646 \u0626\u06d5\u06be\u06cb\u0627\u0644\u062f\u0627)",
"Plugins installed ({0}):":"\u0642\u0627\u0686\u0649\u0644\u0627\u0646\u063a\u0627\u0646 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0644\u0645\u0627 ({0}):","Premium plugins:":"\u064a\u06c7\u0642\u0649\u0631\u0649 \u062f\u06d5\u0631\u0649\u062c\u0649\u0644\u0649\u0643 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0644\u0645\u0627 :","Learn more...":"\u062a\u06d0\u062e\u0649\u0645\u06c7 \u0686\u06c8\u0634\u0649\u0646\u0649\u0634 ...","You are using {0}":"\u0626\u0649\u0634\u0644\u0649\u062a\u0649\u06cb\u0627\u062a\u0642\u0649\u0646\u0649\u06ad\u0649\u0632 {0}",
Plugins:"\u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0644\u0645\u0627","Handy Shortcuts":"\u0642\u0648\u0644\u0627\u064a\u0644\u0649\u0642 \u0642\u0649\u0633\u0642\u0627 \u064a\u0648\u0644","Horizontal line":"\u06af\u0648\u0631\u0632\u0649\u0646\u062a\u0627\u0644 \u0642\u06c7\u0631","Insert/edit image":"\u0631\u06d5\u0633\u0649\u0645 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634 \u064a\u0627\u0643\u0649 \u062a\u06d5\u06be\u0631\u0649\u0631\u0644\u06d5\u0634","Image description":"\u0631\u06d5\u0633\u0649\u0645 \u062a\u06d5\u0633\u06cb\u0649\u0631\u0649",
Source:"\u0645\u06d5\u0646\u0628\u06d5",Dimensions:"\u0686\u0648\u06ad-\u0643\u0649\u0686\u0649\u0643","Constrain proportions":"\u0626\u06d0\u06af\u0649\u0632\u0644\u0649\u0643-\u0643\u06d5\u06ad\u0644\u0649\u0643 \u0646\u0649\u0633\u067e\u0649\u062a\u0649\u0646\u0649 \u0633\u0627\u0642\u0644\u0627\u0634",General:"\u0626\u0627\u062f\u06d5\u062a\u062a\u0649\u0643\u0649",Advanced:"\u0626\u0627\u0644\u0627\u06be\u0649\u062f\u06d5",Style:"\u0626\u06c7\u0633\u0644\u06c7\u067e","Vertical space":"\u06cb\u06d0\u0631\u062a\u0649\u0643\u0627\u0644 \u0628\u0648\u0634\u0644\u06c7\u0642",
"Horizontal space":"\u06af\u0648\u0631\u0632\u0649\u0646\u062a\u0627\u0644 \u0628\u0648\u0634\u0644\u06c7\u0642",Border:"\u064a\u0627\u0642\u0627","Insert image":"\u0631\u06d5\u0633\u0649\u0645 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634",Image:"\u0631\u06d5\u0633\u0649\u0645","Image list":"\u0631\u06d5\u0633\u0649\u0645 \u062a\u0649\u0632\u0649\u0645\u0644\u0649\u0643\u0649","Rotate counterclockwise":"\u200f\u200f\u0633\u0627\u0626\u06d5\u062a\u0643\u06d5 \u0642\u0627\u0631\u0634\u0649 \u0686\u06c6\u0631\u06c8\u0634",
"Rotate clockwise":"\u200f\u200f\u0633\u0627\u0626\u06d5\u062a \u064a\u06c6\u0646\u0649\u0644\u0649\u0634\u0649\u062f\u06d5 \u0686\u06c6\u0631\u06c8\u0634","Flip vertically":"\u06cb\u06d0\u0631\u062a\u0649\u0643\u0627\u0644 \u0626\u06c6\u0631\u06c8\u0634","Flip horizontally":"\u06af\u0648\u0631\u0649\u0632\u0648\u0646\u062a\u0627\u0644 \u0626\u06c6\u0631\u06c8\u0634","Edit image":"\u0631\u06d5\u0633\u0649\u0645 \u062a\u06d5\u06be\u0631\u0649\u0631\u0644\u06d5\u0634","Image options":"\u0631\u06d5\u0633\u0649\u0645 \u062a\u0627\u0644\u0644\u0627\u0646\u0645\u0649\u0644\u0649\u0631\u0649",
"Zoom in":"\u064a\u06d0\u0642\u0649\u0646\u0644\u0627\u062a\u0645\u0627\u0642","Zoom out":"\u064a\u0649\u0631\u0627\u0642\u0644\u0627\u062a\u0645\u0627\u0642",Crop:"\u0642\u0649\u064a\u0649\u0634",Resize:"\u0686\u0648\u06ad\u0644\u06c7\u0642\u0649\u0646\u0649 \u0626\u06c6\u0632\u06af\u06d5\u0631\u062a\u0649\u0634",Orientation:"\u064a\u06c6\u0646\u0649\u0644\u0649\u0634",Brightness:"\u064a\u0648\u0631\u06c7\u0642\u0644\u06c7\u0642\u0649",Sharpen:"\u0626\u06c6\u062a\u0643\u06c8\u0631\u0644\u06d5\u0634\u062a\u06c8\u0631\u06c8\u0634",
Contrast:"\u0633\u06d0\u0644\u0649\u0634\u062a\u06c7\u0631\u0645\u0627","Color levels":"\u0631\u06d5\u06ad \u062f\u06d5\u0631\u0649\u062c\u0649\u0644\u0649\u0631\u0649",Gamma:"\u06af\u0627\u0645\u0645\u0627",Invert:"\u062a\u06d5\u062a\u06c8\u0631",Apply:"\u0642\u0648\u0644\u0644\u0649\u0646\u0649\u0634",Back:"\u0642\u0627\u064a\u062a\u0649\u0634","Insert date/time":"\u0686\u0649\u0633\u0644\u0627/\u06cb\u0627\u0642\u0649\u062a \u0643\u0649\u0631\u06af\u06c8\u0632\u06c8\u0634","Date/time":"\u0686\u06d0\u0633\u0644\u0627\\\u06cb\u0627\u0642\u0649\u062a",
"Insert link":"\u0626\u06c7\u0644\u0649\u0646\u0649\u0634 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634","Insert/edit link":"\u0626\u06c7\u0644\u0649\u0646\u0649\u0634 \u0642\u06c7\u0633\u062a\u06c7\u0631\u06c7\u0634/\u062a\u06d5\u06be\u0631\u0649\u0631\u0644\u06d5\u0634","Text to display":"\u0643\u06c6\u0631\u06c8\u0646\u0649\u062f\u0649\u063a\u0627\u0646 \u0645\u06d5\u0632\u0645\u06c7\u0646",Url:"\u0626\u0627\u062f\u0631\u0649\u0633",Target:"\u0646\u0649\u0634\u0627\u0646",None:"\u064a\u0648\u0642",
"New window":"\u064a\u06d0\u06ad\u0649 \u0643\u06c6\u0632\u0646\u06d5\u0643","Remove link":"\u0626\u06c7\u0644\u0649\u0646\u0649\u0634 \u0626\u06c6\u0686\u06c8\u0631\u06c8\u0634",Anchors:"\u0626\u06c7\u0644\u0649\u0646\u0649\u0634",Link:"\u0626\u06c7\u0644\u0649\u0646\u0649\u0634","Paste or type a link":"\u0626\u06c7\u0644\u0649\u0646\u0649\u0634 \u0686\u0627\u067e\u0644\u0627\u06ad \u064a\u0627\u0643\u0649 \u0643\u0649\u0631\u06af\u06c8\u0632\u06c8\u06ad","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"\u0633\u0649\u0632 \u0643\u0649\u0631\u06af\u06c8\u0632\u06af\u06d5\u0646 URL \u0628\u0649\u0631 \u0626\u06d0\u0644\u062e\u06d5\u062a \u0626\u0627\u062f\u0631\u06d0\u0633\u0649\u062f\u06d5\u0643 \u0642\u0649\u0644\u0649\u067e \u062a\u06c7\u0631\u0649\u062f\u06c7\u060c\u062a\u06d5\u0644\u06d5\u067e \u0642\u0649\u0644\u0649\u0646\u063a\u0627\u0646 mailto \u0646\u0649 \u0642\u06c7\u0634\u0627\u0645\u0633\u0649\u0632\u061f",
"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"\u0633\u0649\u0632 \u0643\u0649\u0631\u06af\u06c8\u0632\u06af\u06d5\u0646 \u062a\u0648\u0631 \u0626\u0627\u062f\u0631\u06d0\u0633\u0649 \u0633\u0649\u0631\u062a\u0642\u0649 \u0626\u06c7\u0644\u0627\u0646\u0645\u0649\u062f\u06d5\u0643 \u0642\u0649\u0644\u0649\u067e \u062a\u06c7\u0631\u0649\u062f\u06c7 \u060c\u062a\u06d5\u0644\u06d5\u067e \u0642\u0649\u0644\u0649\u0646\u063a\u0627\u0646 http:// \u0646\u0649 \u0642\u0648\u0634\u0627\u0645\u0633\u0649\u0632\u061f",
"Link list":"\u0626\u06c7\u0644\u0649\u0646\u0649\u0634 \u062a\u06c8\u0631\u0649","Insert video":"\u0633\u0649\u0646 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634","Insert/edit video":"\u0633\u0649\u0646 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634/\u062a\u06d5\u06be\u0631\u0649\u0631\u0644\u06d5\u0634","Insert/edit media":"\u0645\u06d0\u062f\u0649\u064a\u0627 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634/\u062a\u06d5\u06be\u0631\u0649\u0631\u0644\u06d5\u0634","Alternative source":"\u062a\u06d5\u0633\u06cb\u0649\u0631\u0649",
Poster:"\u064a\u0648\u0644\u0644\u0649\u063a\u06c7\u0686\u0649","Paste your embed code below:":"\u0642\u0649\u0633\u062a\u06c7\u0631\u0645\u0627\u0642\u0686\u0649 \u0628\u0648\u0644\u063a\u0627\u0646 \u0643\u0648\u062f\u0646\u0649 \u0686\u0627\u067e\u0644\u0627\u06ad",Embed:"\u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634",Media:"\u0645\u06d0\u062f\u0649\u064a\u0627","Nonbreaking space":"\u0628\u0648\u0634\u0644\u06c7\u0642","Page break":"\u0628\u06d5\u062a \u0626\u0627\u062e\u0649\u0631\u0644\u0627\u0634\u062a\u06c7\u0631\u06c7\u0634",
"Paste as text":"\u062a\u06d0\u0643\u0649\u0634 \u0634\u06d5\u0643\u0644\u0649\u062f\u06d5 \u0686\u0627\u067e\u0644\u0627\u0634",Preview:"\u0643\u06c6\u0631\u06c8\u0634",Print:"\u0628\u06d0\u0633\u0649\u0634",Save:"\u0633\u0627\u0642\u0644\u0627\u0634",Find:"\u0626\u0649\u0632\u062f\u06d5\u0634","Replace with":"\u0626\u0627\u0644\u0645\u0627\u0634\u062a\u06c7\u0631\u06c7\u0634",Replace:"\u0626\u0627\u0644\u0645\u0627\u0634\u062a\u06c7\u0631\u06c7\u0634","Replace all":"\u06be\u06d5\u0645\u0645\u0649\u0646\u0649 \u0626\u0627\u0644\u0645\u0627\u0634\u062a\u06c7\u0631\u06c7\u0634",
Prev:"\u0626\u0627\u0644\u062f\u0649\u0646\u0642\u0649\u0633\u0649",Next:"\u0643\u06d0\u064a\u0649\u0646\u0643\u0649\u0633\u0649","Find and replace":"\u0626\u0649\u0632\u062f\u06d5\u0634 \u06cb\u06d5 \u0626\u0627\u0644\u0645\u0627\u0634\u062a\u06c7\u0631\u06c7\u0634","Could not find the specified string.":"\u0626\u0649\u0632\u062f\u0649\u0645\u06d5\u0643\u0686\u0649 \u0628\u0648\u0644\u063a\u0627\u0646 \u0645\u06d5\u0632\u0645\u06c7\u0646\u0646\u0649 \u062a\u0627\u067e\u0627\u0644\u0645\u0649\u062f\u0649.",
"Match case":"\u0686\u0648\u06ad \u0643\u0649\u0686\u0649\u0643 \u06be\u06d5\u0631\u0649\u067e\u0646\u0649 \u067e\u06d5\u0631\u0649\u0642\u0644\u06d5\u0646\u062f\u06c8\u0631\u06c8\u0634","Whole words":"\u062a\u0648\u0644\u06c7\u0642 \u0645\u0627\u0633\u0644\u0627\u0634\u062a\u06c7\u0631\u06c7\u0634",Spellcheck:"\u0626\u0649\u0645\u0644\u0627 \u062a\u06d5\u0643\u0634\u06c8\u0631\u06c8\u0634",Ignore:"\u0626\u06c6\u062a\u0643\u06c8\u0632\u06c8\u0634","Ignore all":"\u06be\u06d5\u0645\u0645\u0649\u0646\u0649 \u0626\u06c6\u062a\u0643\u06c8\u0632\u06c8\u0634",
Finish:"\u0626\u0627\u062e\u0649\u0631\u0644\u0627\u0634\u062a\u06c7\u0631\u06c7\u0634","Add to Dictionary":"\u0644\u06c7\u063a\u06d5\u062a \u0642\u0648\u0634\u06c7\u0634","Insert table":"\u062c\u06d5\u062f\u06cb\u06d5\u0644 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634","Table properties":"\u062c\u06d5\u062f\u06cb\u06d5\u0644 \u062e\u0627\u0633\u0644\u0649\u0642\u0649","Delete table":"\u062c\u06d5\u062f\u06cb\u06d5\u0644 \u0626\u06c6\u0686\u06c8\u0631\u0634",Cell:"\u0643\u0627\u062a\u06d5\u0643",
Row:"\u0642\u06c7\u0631",Column:"\u0631\u06d5\u062a","Cell properties":"\u0643\u0627\u062a\u06d5\u0643 \u062e\u0627\u0633\u0644\u0649\u0642\u0649","Merge cells":"\u0643\u0627\u062a\u06d5\u0643 \u0628\u0649\u0631\u0644\u06d5\u0634\u062a\u06c8\u0631\u06c8\u0634","Split cell":"\u0643\u0627\u062a\u06d5\u0643 \u067e\u0627\u0631\u0686\u0649\u0644\u0627\u0634","Insert row before":"\u0626\u0627\u0644\u062f\u0649\u063a\u0627 \u0642\u06c7\u0631 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634","Insert row after":"\u0626\u0627\u0631\u0642\u0649\u063a\u0627 \u0642\u06c7\u0631 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634",
"Delete row":"\u0642\u06c7\u0631 \u0626\u06c6\u0686\u06c8\u0631\u06c8\u0634","Row properties":"\u0642\u06c7\u0631 \u062e\u0627\u0633\u0644\u0649\u0642\u0649","Cut row":"\u0642\u06c7\u0631 \u0643\u06d0\u0633\u0649\u0634","Copy row":"\u0642\u06c7\u0631 \u0643\u06c6\u0686\u06c8\u0631\u06c8\u0634","Paste row before":"\u0642\u06c7\u0631 \u0626\u0627\u0644\u062f\u0649\u063a\u0627 \u0686\u0627\u067e\u0644\u0627\u0634","Paste row after":"\u0642\u06c7\u0631 \u0643\u06d5\u064a\u0646\u0649\u06af\u06d5 \u0686\u0627\u067e\u0644\u0627\u0634",
"Insert column before":"\u0631\u06d5\u062a \u0626\u0627\u0644\u062f\u0649\u063a\u0627 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634","Insert column after":"\u0631\u06d5\u062a \u0643\u06d5\u064a\u0646\u0649\u06af\u06d5 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634","Delete column":"\u0631\u06d5\u062a \u0626\u06c6\u0686\u06c8\u0631\u06c8\u0634",Cols:"\u0631\u06d5\u062a",Rows:"\u0642\u06c7\u0631",Width:"\u0643\u06d5\u06ad\u0644\u0649\u0643\u0649",Height:"\u0626\u06d0\u06af\u0649\u0632\u0644\u0649\u0643\u0649",
"Cell spacing":"\u0643\u0627\u062a\u06d5\u0643 \u0633\u0649\u0631\u062a\u0642\u0649 \u0626\u0627\u0631\u0649\u0644\u0649\u0642\u0649","Cell padding":"\u0643\u0627\u062a\u06d5\u0643 \u0626\u0649\u0686\u0643\u0649 \u0626\u0627\u0631\u0649\u0644\u0649\u0642\u0649",Caption:"\u0686\u06c8\u0634\u06d5\u0646\u062f\u06c8\u0631\u06c8\u0634",Left:"\u0633\u0648\u0644",Center:"\u0645\u06d5\u0631\u0643\u06d5\u0632",Right:"\u0626\u0648\u06ad","Cell type":"\u0643\u0627\u062a\u06d5\u0643 \u062a\u0649\u067e\u0649",
Scope:"\u062f\u0627\u0626\u0649\u0631\u06d5",Alignment:"\u064a\u06c6\u0644\u0649\u0646\u0649\u0634\u0649","H Align":"\u06af\u0648\u0631\u0632\u0649\u0646\u062a\u0627\u0644 \u062a\u0648\u063a\u0631\u0649\u0644\u0627\u0634","V Align":"\u06cb\u06d0\u0631\u062a\u0649\u0643\u0627\u0644 \u062a\u0648\u063a\u0631\u0649\u0644\u0627\u0634",Top:"\u0626\u06c8\u0633\u062a\u0649",Middle:"\u0626\u0648\u062a\u062a\u06c7\u0631\u0633\u0649",Bottom:"\u0626\u0627\u0633\u062a\u0649","Header cell":"\u0628\u0627\u0634 \u0643\u0627\u062a\u06d5\u0643",
"Row group":"\u0642\u06c7\u0631 \u06af\u06c7\u0631\u06c7\u067e\u067e\u0649\u0633\u0649","Column group":"\u0631\u06d5\u062a \u06af\u06c7\u0631\u06c7\u067e\u067e\u0649\u0633\u0649","Row type":"\u0642\u06c7\u0631 \u062a\u0649\u067e\u0649",Header:"\u0628\u06d0\u0634\u0649",Body:"\u0628\u06d5\u062f\u0649\u0646\u0649",Footer:"\u067e\u06c7\u062a\u0649","Border color":"\u0631\u0627\u0645\u0643\u0627 \u0631\u06d5\u06ad\u06af\u0649","Insert template":"\u0626\u06c8\u0644\u06af\u06d5 \u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634",
Templates:"\u0626\u06c8\u0644\u06af\u0649\u0644\u06d5\u0631",Template:"\u0626\u06c8\u0644\u06af\u0649\u0644\u06d5\u0631","Text color":"\u062e\u06d5\u062a \u0631\u06d5\u06ad\u06af\u0649","Background color":"\u0626\u0627\u0631\u0642\u0627 \u0631\u06d5\u06ad\u06af\u0649","Custom...":"\u0626\u0649\u062e\u062a\u0649\u064a\u0627\u0631\u0649","Custom color":"\u0626\u0649\u062e\u062a\u0649\u064a\u0627\u0631\u0649 \u0631\u06d5\u06ad","No color":"\u0631\u06d5\u06ad \u064a\u0648\u0642","Table of Contents":"\u062c\u06d5\u062f\u06d5\u0644\u0646\u0649\u06ad \u0645\u06d5\u0632\u0645\u06c7\u0646\u0649",
"Show blocks":"\u0631\u0627\u064a\u0648\u0646 \u0643\u06c6\u0631\u0633\u0649\u062a\u0649\u0634","Show invisible characters":"\u0643\u06c6\u0631\u06c8\u0646\u0645\u06d5\u064a\u062f\u0649\u063a\u0627\u0646 \u06be\u06d5\u0631\u0649\u067e\u0644\u06d5\u0631\u0646\u0649 \u0643\u06c6\u0631\u0633\u0649\u062a\u0649\u0634","Words: {0}":"\u0633\u06c6\u0632: {0}","{0} words":"{0} \u0633\u06c6\u0632",File:"\u06be\u06c6\u062c\u062c\u06d5\u062a",Edit:"\u062a\u06d5\u06be\u0631\u0649\u0631\u0644\u06d5\u0634",Insert:"\u0642\u0649\u0633\u062a\u06c7\u0631\u06c7\u0634",
View:"\u0643\u06c6\u0631\u06c8\u0634",Format:"\u0641\u0648\u0631\u0645\u0627\u062a",Table:"\u062c\u06d5\u062f\u06cb\u06d5\u0644",Tools:"\u0642\u06c7\u0631\u0627\u0644","Powered by {0}":"\u062a\u06d0\u062e\u0646\u0649\u0643\u0649\u062f\u0627 {0}","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"\u0645\u0648\u0644 \u0645\u06d5\u0632\u0645\u06c7\u0646\u0644\u06c7\u0642 \u062a\u06d0\u0643\u06d0\u0633\u0649\u062a \u0631\u0627\u0645\u0643\u0649\u0633\u0649 \u0631\u0627\u064a\u0648\u0646\u0649\u062f\u0627 \u062a\u0649\u0632\u0649\u0645\u0644\u0649\u0643 \u0626\u06c8\u0686\u06c8\u0646 ALT-F9 \u0646\u0649\u060c \u0642\u0648\u0631\u0627\u0644 \u0628\u0627\u0644\u062f\u0649\u0642\u0649 \u0626\u06c8\u0686\u06c8\u0646 ALT-F10 \u0646\u0649\u060c \u064a\u0627\u0631\u062f\u06d5\u0645 \u0626\u06c8\u0686\u06c8\u0646 ALT-0 \u0646\u0649 \u0628\u06d0\u0633\u0649\u06ad"});
| 599.428571 | 1,289 | 0.784358 |
83abfbbfc3117147bb05843d29cad8317bb8a22f | 22,802 | js | JavaScript | dist/js/tool.js | Jaspur/nova-backup-tool | b868cb71643cf691eb0ccab36b9c5038f07165e4 | [
"MIT"
] | null | null | null | dist/js/tool.js | Jaspur/nova-backup-tool | b868cb71643cf691eb0ccab36b9c5038f07165e4 | [
"MIT"
] | null | null | null | dist/js/tool.js | Jaspur/nova-backup-tool | b868cb71643cf691eb0ccab36b9c5038f07165e4 | [
"MIT"
] | null | null | null | !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e){t.exports=function(t,e,n,r,o,a){var i,s=t=t||{},u=typeof t.default;"object"!==u&&"function"!==u||(i=t,s=t.default);var c,l="function"==typeof s?s.options:s;if(e&&(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0),n&&(l.functional=!0),o&&(l._scopeId=o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=c):r&&(c=r),c){var d=l.functional,p=d?l.render:l.beforeCreate;d?(l._injectStyles=c,l.render=function(t,e){return c.call(e),p(t,e)}):l.beforeCreate=p?[].concat(p,c):[c]}return{esModule:i,exports:s,options:l}}},function(t,e,n){t.exports=n(2)},function(t,e,n){Nova.booting(function(t,e){e.addRoutes([{name:"BackupTool",path:"/backups",component:n(3)}])})},function(t,e,n){var r=n(0)(n(4),n(26),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5),o=n.n(r),a=function(){return window.axios.get("/nova-vendor/spatie/backup-tool/backup-statuses").then(function(t){return t.data})},i=function(t){return window.axios.get("/nova-vendor/spatie/backup-tool/backups?disk="+t).then(function(t){return t.data})},s=function(){return window.axios.post("/nova-vendor/spatie/backup-tool/backups")},u=function(t){return window.axios.post("/nova-vendor/spatie/backup-tool/backups",{option:t})},c=function(t){var e=t.disk,n=t.path;return window.axios.delete("/nova-vendor/spatie/backup-tool/backups",{params:{disk:e,path:n}})},l=n(8),d=n.n(l),p=n(19),f=n.n(p);e.default={components:{Backups:d.a,BackupStatuses:f.a},computed:{disks:function(){return this.backupStatuses.map(function(t){return t.disk})}},data:function(){return{activeDisk:null,activeDiskBackups:[],backupStatuses:[],initialLoading:!0,loading:!0}},created:function(){var t,e=(t=o.a.mark(function t(){return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.initialLoading=!1,t.next=3,this.updateBackupStatuses();case 3:return t.next=5,this.updateActiveDiskBackups();case 5:this.loading=!1,this.startPolling();case 7:case"end":return t.stop()}},t,this)}),function(){var e=t.apply(this,arguments);return new Promise(function(t,n){return function r(o,a){try{var i=e[o](a),s=i.value}catch(t){return void n(t)}if(!i.done)return Promise.resolve(s).then(function(t){r("next",t)},function(t){r("throw",t)});t(s)}("next")})});return function(){return e.apply(this,arguments)}}(),methods:{updateBackupStatuses:function(){var t=this;return a().then(function(e){t.backupStatuses=e,t.activeDisk||(t.activeDisk=e[0].disk)})},updateActiveDiskBackups:function(){var t=this;if(this.activeDisk)return i(this.activeDisk).then(function(e){t.activeDiskBackups=e})},createBackup:function(){return this.$toasted.show(this.__("Creating a new backup in the background..."),{type:"success"}),s()},createPartialBackup:function(t){return this.$toasted.show(this.__("Creating a new backup in the background...")+" ("+t+")",{type:"success"}),this.$refs.backupDropdownMenu.toggle(),u(t)},deleteBackup:function(t){var e=t.disk,n=t.path;return c({disk:e,path:n})},startPolling:function(){var t=this;if(Nova.config.nova_backup_tool.polling){var e=window.setInterval(function(){t.updateBackupStatuses(),t.updateActiveDiskBackups()},1e3*Nova.config.nova_backup_tool.polling_interval);this.$once("hook:beforeDestroy",function(){window.clearInterval(e)})}}}}},function(t,e,n){t.exports=n(6)},function(t,e,n){var r=function(){return this}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(7),o)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,o=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag",c="object"==typeof t,l=e.regeneratorRuntime;if(l)c&&(t.exports=l);else{(l=e.regeneratorRuntime=c?t.exports:{}).wrap=k;var d="suspendedStart",p="suspendedYield",f="executing",h="completed",v={},_={};_[i]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(R([])));m&&m!==r&&o.call(m,i)&&(_=m);var y=C.prototype=w.prototype=Object.create(_);x.prototype=y.constructor=C,C.constructor=x,C[u]=x.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(y),t},l.awrap=function(t){return{__await:t}},D(L.prototype),L.prototype[s]=function(){return this},l.AsyncIterator=L,l.async=function(t,e,n,r){var o=new L(k(t,e,n,r));return l.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},D(y),y[u]="Generator",y[i]=function(){return this},y.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=R,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return s.type="throw",s.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:R(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function k(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),i=new O(r||[]);return a._invoke=function(t,e,n){var r=d;return function(o,a){if(r===f)throw new Error("Generator is already running");if(r===h){if("throw"===o)throw a;return j()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=E(i,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var u=b(t,e,n);if("normal"===u.type){if(r=n.done?h:p,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=h,n.method="throw",n.arg=u.arg)}}}(t,n,i),a}function b(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function w(){}function x(){}function C(){}function D(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function L(t){var e;this._invoke=function(n,r){function a(){return new Promise(function(e,a){!function e(n,r,a,i){var s=b(t[n],t,r);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,a,i)},function(t){e("throw",t,a,i)}):Promise.resolve(c).then(function(t){u.value=t,a(u)},i)}i(s.arg)}(n,r,e,a)})}return e=e?e.then(a,a):a()}}function E(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,E(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=b(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function R(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return a.next=a}}return{next:j}}function j(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,n){var r=n(0)(n(9),n(18),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),o=n.n(r);e.default={props:{disks:{required:!0,type:Array},activeDisk:{required:!0,type:String},backups:{required:!0,type:Array}},data:function(){return{deletingBackup:null,deleteModalOpen:!1}},components:{Backup:o.a},methods:{openDeleteModal:function(t){this.deleteModalOpen=!0,this.deletingBackup=t},closeDeleteModal:function(){this.deleteModalOpen=!1,this.deletingBackup=null},confirmDelete:function(){this.deleteModalOpen=!1,this.$emit("delete",{disk:this.activeDisk,path:this.deletingBackup.path})}}}},function(t,e,n){var r=n(0)(n(16),n(17),!1,function(t){n(11)},"data-v-1491b1d4",null);t.exports=r.exports},function(t,e,n){var r=n(12);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);n(14)("242ff624",r,!0,{})},function(t,e,n){(t.exports=n(13)(!1)).push([t.i,".is-deleting td[data-v-1491b1d4]{color:var(--60)}",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(i=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),a=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(a).concat([o]).join("\n")}var i;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(r[a]=!0)}for(o=0;o<t.length;o++){var i=t[o];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),e.push(i))}},e}},function(t,e,n){var r="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o=n(15),a={},i=r&&(document.head||document.getElementsByTagName("head")[0]),s=null,u=0,c=!1,l=function(){},d=null,p="data-vue-ssr-id",f="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(t){for(var e=0;e<t.length;e++){var n=t[e],r=a[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(_(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var i=[];for(o=0;o<n.parts.length;o++)i.push(_(n.parts[o]));a[n.id]={id:n.id,refs:1,parts:i}}}}function v(){var t=document.createElement("style");return t.type="text/css",i.appendChild(t),t}function _(t){var e,n,r=document.querySelector("style["+p+'~="'+t.id+'"]');if(r){if(c)return l;r.parentNode.removeChild(r)}if(f){var o=u++;r=s||(s=v()),e=y.bind(null,r,o,!1),n=y.bind(null,r,o,!0)}else r=v(),e=function(t,e){var n=e.css,r=e.media,o=e.sourceMap;r&&t.setAttribute("media",r);d.ssrId&&t.setAttribute(p,e.id);o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}t.exports=function(t,e,n,r){c=n,d=r||{};var i=o(t,e);return h(i),function(e){for(var n=[],r=0;r<i.length;r++){var s=i[r];(u=a[s.id]).refs--,n.push(u)}e?h(i=o(t,e)):i=[];for(r=0;r<n.length;r++){var u;if(0===(u=n[r]).refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete a[u.id]}}}};var g,m=(g=[],function(t,e){return g[t]=e,g.filter(Boolean).join("\n")});function y(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=m(e,o);else{var a=document.createTextNode(o),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(a,i[e]):t.appendChild(a)}}},function(t,e){t.exports=function(t,e){for(var n=[],r={},o=0;o<e.length;o++){var a=e[o],i=a[0],s={id:t+":"+o,css:a[1],media:a[2],sourceMap:a[3]};r[i]?r[i].parts.push(s):n.push(r[i]={id:i,parts:[s]})}return n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{date:{required:!0},path:{required:!0},size:{required:!0},disk:{required:!0},deletable:{required:!0},deleting:{required:!0}},computed:{downloadUrl:function(){return"/nova-vendor/spatie/backup-tool/download-backup?disk="+this.disk+"&path="+this.path}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("tr",{class:{"is-deleting":t.deleting}},[n("td",[t._v(t._s(t.path))]),t._v(" "),n("td",[t._v(t._s(t.date))]),t._v(" "),n("td",[t._v(t._s(t.size))]),t._v(" "),n("td",{staticClass:"text-right"},[n("a",{staticClass:"appearance-none cursor-pointer text-70 hover:text-primary mr-3",attrs:{href:t.downloadUrl,target:"_blank",rel:"noopener nofollow",title:t.__("Download")}},[n("icon",{attrs:{type:"download","view-box":"0 0 24 24",width:"20",height:"20"}})],1),t._v(" "),n("button",{staticClass:"appearance-none mr-3",class:t.deletable?"text-70 hover:text-primary":"cursor-default text-40",attrs:{title:t.__("Delete"),disabled:!t.deletable},on:{click:function(e){return e.preventDefault(),t.$emit("delete")}}},[n("icon",{attrs:{type:"delete"}})],1)])])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.disks.length>1?n("div",{staticClass:"p-3 flex items-center border-b border-50"},[n("select",{staticClass:"form-control form-select",domProps:{value:t.activeDisk},on:{input:function(e){return t.$emit("update:activeDisk",e.target.value)}}},t._l(t.disks,function(e){return n("option",{key:e,domProps:{value:e}},[t._v("\n "+t._s(e)+"\n ")])}),0)]):t._e(),t._v(" "),n("table",{staticClass:"table w-full",attrs:{cellpadding:"0",cellspacing:"0"}},[n("thead",[n("tr",[n("th",{staticClass:"text-left"},[t._v("\n "+t._s(t.__("Path"))+"\n ")]),t._v(" "),n("th",{staticClass:"text-left"},[t._v("\n "+t._s(t.__("Created at"))+"\n ")]),t._v(" "),n("th",{staticClass:"text-left"},[t._v("\n "+t._s(t.__("Size"))+"\n ")]),t._v(" "),n("th")])]),t._v(" "),n("tbody",[t._l(t.backups,function(e){return n("backup",t._b({key:e.id,attrs:{disk:t.activeDisk,deletable:t.backups.length>1,deleting:!t.deleteModalOpen&&t.deletingBackup&&e.path===t.deletingBackup.path},on:{delete:function(n){return t.openDeleteModal(e)}}},"backup",e,!1))}),t._v(" "),0===t.backups.length?n("tr",[n("td",{staticClass:"text-center",attrs:{colspan:"4"}},[t._v("\n "+t._s(t.__("No backups present"))+"\n ")])]):t._e()],2)]),t._v(" "),n("portal",{attrs:{to:"modals"}},[n("transition",{attrs:{name:"fade"}},[t.deleteModalOpen?n("delete-resource-modal",{attrs:{mode:"delete"},on:{confirm:t.confirmDelete,close:t.closeDeleteModal}},[n("div",{staticClass:"p-8"},[n("heading",{staticClass:"mb-6",attrs:{level:2}},[t._v("\n "+t._s(t.__("Delete backup"))+"\n ")]),t._v(" "),n("p",{staticClass:"text-80 leading-normal"},[t._v("\n "+t._s(t.__("Are you sure you want to delete the backup created at :date ?",{date:t.deletingBackup.date}))+"\n ")])],1)]):t._e()],1)],1)],1)},staticRenderFns:[]}},function(t,e,n){var r=n(0)(n(20),n(25),!1,null,null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(21),o=n.n(r),a=n(23),i=n.n(a);e.default={props:{backupStatuses:{required:!0,type:Array}},components:{IconHealthy:o.a,IconUnhealthy:i.a}}},function(t,e,n){var r=n(0)(null,n(22),!1,null,null,null);t.exports=r.exports},function(t,e){t.exports={render:function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{attrs:{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M2.93 17.07A10 10 0 1 0 17.07 2.93 10 10 0 0 0 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM4 10l2-2 3 3 5-5 2 2-7 7-5-5z",fill:"var(--success)","fill-rule":"evenodd"}})])},staticRenderFns:[]}},function(t,e,n){var r=n(0)(null,n(24),!1,null,null,null);t.exports=r.exports},function(t,e){t.exports={render:function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{attrs:{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{d:"M11.41 10l2.83-2.83-1.41-1.41L10 8.59 7.17 5.76 5.76 7.17 8.59 10l-2.83 2.83 1.41 1.41L10 11.41l2.83 2.83 1.41-1.41L11.41 10zm-8.48 7.07A10 10 0 1 0 17.07 2.93 10 10 0 0 0 2.93 17.07zm1.41-1.41A8 8 0 1 0 15.66 4.34 8 8 0 0 0 4.34 15.66z",fill:"var(--danger)","fill-rule":"evenodd"}})])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("table",{staticClass:"table w-full",attrs:{cellpadding:"0",cellspacing:"0"}},[n("thead",[n("tr",[n("th",{staticClass:"text-left rounded-tl"},[t._v("\n "+t._s(t.__("Disk"))+"\n ")]),t._v(" "),n("th",{staticClass:"text-left"},[t._v("\n "+t._s(t.__("Healthy"))+"\n ")]),t._v(" "),n("th",{staticClass:"text-left"},[t._v("\n "+t._s(t.__("Amount of backups"))+"\n ")]),t._v(" "),n("th",{staticClass:"text-left"},[t._v("\n "+t._s(t.__("Newest backup"))+"\n ")]),t._v(" "),n("th",{staticClass:"text-left rounded-tr"},[t._v("\n "+t._s(t.__("Used Storage"))+"\n ")])])]),t._v(" "),n("tbody",t._l(t.backupStatuses,function(e){return n("tr",{key:e.disk},[n("td",[t._v(t._s(e.disk))]),t._v(" "),n("td",[n(e.healthy?"icon-healthy":"icon-unhealthy",{tag:"svg",attrs:{height:"24px"}})],1),t._v(" "),n("td",[t._v(t._s(e.amount))]),t._v(" "),n("td",[t._v(t._s(e.newest))]),t._v(" "),n("td",[t._v(t._s(e.usedStorage))])])}),0)])},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("loading-view",{attrs:{loading:t.initialLoading}},[n("div",{staticClass:"flex mb-6 items-center justify-between"},[n("heading",[t._v("\n "+t._s(t.__("Backups"))+"\n ")]),t._v(" "),n("button",{staticClass:"btn btn-default btn-primary ml-auto mr-3",on:{click:t.createBackup}},[t._v("\n "+t._s(t.__("Create Backup"))+"\n ")]),t._v(" "),n("dropdown",{ref:"backupDropdownMenu",attrs:{dusk:"select-all-dropdown"},scopedSlots:t._u([{key:"default",fn:function(t){var e=t.toggle;return n("dropdown-trigger",{staticClass:"mr-3",attrs:{"show-arrow":!1,handleClick:e}},[n("button",{staticClass:"btn btn-default btn-icon btn-primary font-normal no-text-shadow"},[n("icon",{staticClass:"text-white",attrs:{type:"menu","view-box":"0 0 24 24",width:"20",height:"20"}})],1)])}}])},[t._v(" "),n("dropdown-menu",{attrs:{slot:"menu",direction:"rtl",width:"250"},slot:"menu"},[n("ul",{staticClass:"list-reset"},[n("li",[n("a",{staticClass:"block p-3 text-90 hover:bg-30 cursor-pointer",on:{click:function(e){return e.preventDefault(),t.createPartialBackup("only-db")}}},[t._v("\n "+t._s(t.__("Create database backup"))+"\n ")])]),t._v(" "),n("li",[n("a",{staticClass:"block p-3 text-90 hover:bg-30 cursor-pointer",on:{click:function(e){return e.preventDefault(),t.createPartialBackup("only-files")}}},[t._v("\n "+t._s(t.__("Create files backup"))+"\n ")])])])])],1)],1),t._v(" "),n("loading-card",{staticClass:"mb-6",attrs:{loading:t.loading}},[n("backup-statuses",{attrs:{"backup-statuses":t.backupStatuses}})],1),t._v(" "),n("loading-card",{attrs:{loading:t.loading}},[t.activeDisk?n("backups",{attrs:{disks:t.disks,backups:t.activeDiskBackups,"active-disk":t.activeDisk},on:{"update:activeDisk":function(e){t.activeDisk=e},"update:active-disk":function(e){t.activeDisk=e},delete:t.deleteBackup}}):t._e()],1)],1)},staticRenderFns:[]}}]); | 22,802 | 22,802 | 0.664635 |
83ac0bf3aa2f3e08b3bbc0aaded5d0d8a624f8db | 12,629 | js | JavaScript | app/e2e/client/rocketchat.e2e.room.js | teleniasoftware/Rocket.Chat | 35171fac51c491b01cef6fc8d83df13af2cf243e | [
"MIT"
] | 1 | 2021-03-21T22:58:17.000Z | 2021-03-21T22:58:17.000Z | app/e2e/client/rocketchat.e2e.room.js | teleniasoftware/Rocket.Chat | 35171fac51c491b01cef6fc8d83df13af2cf243e | [
"MIT"
] | null | null | null | app/e2e/client/rocketchat.e2e.room.js | teleniasoftware/Rocket.Chat | 35171fac51c491b01cef6fc8d83df13af2cf243e | [
"MIT"
] | null | null | null | import _ from 'underscore';
import { Base64 } from 'meteor/base64';
import { EJSON } from 'meteor/ejson';
import { Random } from 'meteor/random';
import { Session } from 'meteor/session';
import { TimeSync } from 'meteor/mizzao:timesync';
import { Emitter } from '@rocket.chat/emitter';
import { e2e } from './rocketchat.e2e';
import {
toString,
toArrayBuffer,
joinVectorAndEcryptedData,
splitVectorAndEcryptedData,
encryptRSA,
encryptAES,
decryptRSA,
decryptAES,
generateAESKey,
exportJWKKey,
importAESKey,
importRSAKey,
readFileAsArrayBuffer,
} from './helper';
import { Notifications } from '../../notifications/client';
import { Rooms, Subscriptions, Messages } from '../../models';
import { call } from '../../ui-utils';
import { roomTypes, RoomSettingsEnum } from '../../utils';
export const E2E_ROOM_STATES = {
NO_PASSWORD_SET: 'NO_PASSWORD_SET',
NOT_STARTED: 'NOT_STARTED',
DISABLED: 'DISABLED',
PAUSED: 'PAUSED',
HANDSHAKE: 'HANDSHAKE',
ESTABLISHING: 'ESTABLISHING',
CREATING_KEYS: 'CREATING_KEYS',
WAITING_KEYS: 'WAITING_KEYS',
KEYS_RECEIVED: 'KEYS_RECEIVED',
READY: 'READY',
ERROR: 'ERROR',
};
const KEY_ID = Symbol('keyID');
const reduce = (prev, next) => {
if (prev === next) {
return next === E2E_ROOM_STATES.ERROR;
}
switch (next) {
case E2E_ROOM_STATES.READY:
if (prev === E2E_ROOM_STATES.PAUSED) {
return E2E_ROOM_STATES.READY;
}
return E2E_ROOM_STATES.DISABLED;
case E2E_ROOM_STATES.PAUSED:
if (prev === E2E_ROOM_STATES.READY) {
return E2E_ROOM_STATES.PAUSED;
}
return E2E_ROOM_STATES.DISABLED;
}
switch (prev) {
case E2E_ROOM_STATES.PAUSED:
if (next === E2E_ROOM_STATES.READY) {
return E2E_ROOM_STATES.READY;
}
return false;
case E2E_ROOM_STATES.NOT_STARTED:
return [E2E_ROOM_STATES.ESTABLISHING, E2E_ROOM_STATES.PAUSED, E2E_ROOM_STATES.DISABLED, E2E_ROOM_STATES.KEYS_RECEIVED].includes(next) && next;
case E2E_ROOM_STATES.READY:
return [E2E_ROOM_STATES.PAUSED, E2E_ROOM_STATES.DISABLED].includes(next) && next;
case E2E_ROOM_STATES.ERROR:
return [E2E_ROOM_STATES.KEYS_RECEIVED, E2E_ROOM_STATES.NOT_STARTED].includes(next) && next;
case E2E_ROOM_STATES.WAITING_KEYS:
return [E2E_ROOM_STATES.KEYS_RECEIVED, E2E_ROOM_STATES.ERROR, E2E_ROOM_STATES.PAUSED, E2E_ROOM_STATES.DISABLED].includes(next) && next;
case E2E_ROOM_STATES.ESTABLISHING:
return [E2E_ROOM_STATES.READY, E2E_ROOM_STATES.KEYS_RECEIVED, E2E_ROOM_STATES.ERROR, E2E_ROOM_STATES.PAUSED, E2E_ROOM_STATES.DISABLED, E2E_ROOM_STATES.WAITING_KEYS].includes(next) && next;
default:
return next;
}
};
export class E2ERoom extends Emitter {
log(...msg) {
if (this.roomId === Session.get('openedRoom')) {
console.log('[E2E ROOM]', `[STATE: ${ this.state }]`, `[RID: ${ this.roomId }]`, ...msg);
}
}
error(...msg) {
if (this.roomId === Session.get('openedRoom')) {
console.error('[E2E ROOM]', `[STATE: ${ this.state }]`, `[RID: ${ this.roomId }]`, ...msg);
}
}
setState(state) {
const prev = this.state;
const next = reduce(prev, state);
if (!next) {
this.error(`invalid state ${ prev } -> ${ state }`);
return;
}
this.state = state;
this.emit('STATE_CHANGED', prev, next, this);
this.emit(state, this);
}
constructor(userId, roomId, t) {
super();
this.state = undefined;
// this.error = undefined;
this.userId = userId;
this.roomId = roomId;
this.typeOfRoom = t;
this.once(E2E_ROOM_STATES.READY, () => this.decryptPendingMessages());
this.once(E2E_ROOM_STATES.READY, () => this.decryptPendingSubscription());
this.on('STATE_CHANGED', (prev) => {
if (this.roomId === Session.get('openedRoom')) {
this.log(`[PREV: ${ prev }]`, 'State CHANGED');
}
});
this.on('STATE_CHANGED', () => this.handshake());
this.setState(E2E_ROOM_STATES.NOT_STARTED);
}
disable() {
this.setState(E2E_ROOM_STATES.DISABLED);
}
keyReceived() {
this.setState(E2E_ROOM_STATES.KEYS_RECEIVED);
}
pause() {
![E2E_ROOM_STATES.PAUSED, E2E_ROOM_STATES.DISABLED].includes(this.state) && this.setState(this.state === E2E_ROOM_STATES.READY ? E2E_ROOM_STATES.PAUSED : E2E_ROOM_STATES.DISABLED);
}
enable() {
![E2E_ROOM_STATES.READY].includes(this.state) && this.setState(E2E_ROOM_STATES.READY);
}
shouldConvertSentMessages() {
return this.isReady() && ! this.isPaused();
}
shouldConvertReceivedMessages() {
return this.isReady();
}
isDisabled() {
return [E2E_ROOM_STATES.DISABLED].includes(this.state);
}
isPaused() {
return [E2E_ROOM_STATES.PAUSED].includes(this.state);
}
wait(state) {
return new Promise((resolve) => (state === this.state ? resolve(this) : this.once(state, () => resolve(this)))).then((el) => {
this.log(this.state, el);
return el;
});
}
isReady() {
return [E2E_ROOM_STATES.PAUSED, E2E_ROOM_STATES.READY].includes(this.state);
}
isWaitingKeys() {
return this.state === E2E_ROOM_STATES.WAITING_KEYS;
}
get keyID() {
return this[KEY_ID];
}
set keyID(keyID) {
this[KEY_ID] = keyID;
}
async decryptPendingSubscription() {
const subscription = Subscriptions.findOne({
rid: this.roomId,
});
const data = await (subscription.lastMessage?.msg && this.decrypt(subscription.lastMessage.msg));
if (!data?.text) {
this.log('decryptPendingSubscriptions nothing to do');
return;
}
Subscriptions.direct.update({
_id: subscription._id,
}, {
$set: {
'lastMessage.msg': data.text,
'lastMessage.e2e': 'done',
},
});
this.log('decryptPendingSubscriptions Done');
}
async decryptPendingMessages() {
return Messages.find({ rid: this.roomId, t: 'e2e', e2e: 'pending' }).forEach(async ({ _id, ...msg }) => {
Messages.direct.update({ _id }, await this.decryptMessage(msg));
});
}
// Initiates E2E Encryption
async handshake() {
switch (this.state) {
case E2E_ROOM_STATES.KEYS_RECEIVED:
case E2E_ROOM_STATES.NOT_STARTED:
this.setState(E2E_ROOM_STATES.ESTABLISHING);
try {
const groupKey = Subscriptions.findOne({ rid: this.roomId }).E2EKey;
if (groupKey) {
await this.importGroupKey(groupKey);
return this.setState(E2E_ROOM_STATES.READY);
}
} catch (error) {
this.setState(E2E_ROOM_STATES.ERROR);
// this.error = error;
return this.error('Error fetching group key: ', error);
}
try {
const room = Rooms.findOne({ _id: this.roomId });
if (!room.e2eKeyId) { // TODO CHECK_PERMISSION
this.setState(E2E_ROOM_STATES.CREATING_KEYS);
await this.createGroupKey();
return this.setState(E2E_ROOM_STATES.READY);
}
this.setState(E2E_ROOM_STATES.WAITING_KEYS);
this.log('Requesting room key');
Notifications.notifyUsersOfRoom(this.roomId, 'e2ekeyRequest', this.roomId, room.e2eKeyId);
} catch (error) {
// this.error = error;
this.setState(E2E_ROOM_STATES.ERROR);
}
}
}
isSupportedRoomType(type) {
return roomTypes.getConfig(type).allowRoomSettingChange({}, RoomSettingsEnum.E2E);
}
async importGroupKey(groupKey) {
this.log('Importing room key ->', this.roomId);
// Get existing group key
// const keyID = groupKey.slice(0, 12);
groupKey = groupKey.slice(12);
groupKey = Base64.decode(groupKey);
// Decrypt obtained encrypted session key
try {
const decryptedKey = await decryptRSA(e2e.privateKey, groupKey);
this.sessionKeyExportedString = toString(decryptedKey);
} catch (error) {
return this.error('Error decrypting group key: ', error);
}
this.keyID = Base64.encode(this.sessionKeyExportedString).slice(0, 12);
// Import session key for use.
try {
const key = await importAESKey(JSON.parse(this.sessionKeyExportedString));
// Key has been obtained. E2E is now in session.
this.groupSessionKey = key;
} catch (error) {
return this.error('Error importing group key: ', error);
}
}
async createGroupKey() {
this.log('Creating room key');
// Create group key
try {
this.groupSessionKey = await generateAESKey();
} catch (error) {
console.error('Error generating group key: ', error);
throw error;
}
try {
const sessionKeyExported = await exportJWKKey(this.groupSessionKey);
this.sessionKeyExportedString = JSON.stringify(sessionKeyExported);
this.keyID = Base64.encode(this.sessionKeyExportedString).slice(0, 12);
await call('e2e.setRoomKeyID', this.roomId, this.keyID);
await this.encryptKeyForOtherParticipants();
} catch (error) {
this.error('Error exporting group key: ', error);
throw error;
}
}
async encryptKeyForOtherParticipants() {
// Encrypt generated session key for every user in room and publish to subscription model.
try {
const { users } = await call('e2e.getUsersOfRoomWithoutKey', this.roomId);
users.forEach((user) => this.encryptForParticipant(user));
} catch (error) {
return this.error('Error getting room users: ', error);
}
}
async encryptForParticipant(user) {
let userKey;
try {
userKey = await importRSAKey(JSON.parse(user.e2e.public_key), ['encrypt']);
} catch (error) {
return this.error('Error importing user key: ', error);
}
// const vector = crypto.getRandomValues(new Uint8Array(16));
// Encrypt session key for this user with his/her public key
try {
const encryptedUserKey = await encryptRSA(userKey, toArrayBuffer(this.sessionKeyExportedString));
// Key has been encrypted. Publish to that user's subscription model for this room.
await call('e2e.updateGroupKey', this.roomId, user._id, this.keyID + Base64.encode(new Uint8Array(encryptedUserKey)));
} catch (error) {
return this.error('Error encrypting user key: ', error);
}
}
// Encrypts files before upload. I/O is in arraybuffers.
async encryptFile(file) {
if (!this.isSupportedRoomType(this.typeOfRoom)) {
return;
}
const fileArrayBuffer = await readFileAsArrayBuffer(file);
const vector = crypto.getRandomValues(new Uint8Array(16));
let result;
try {
result = await encryptAES(vector, this.groupSessionKey, fileArrayBuffer);
} catch (error) {
return this.error('Error encrypting group key: ', error);
}
const output = joinVectorAndEcryptedData(vector, result);
const encryptedFile = new File([toArrayBuffer(EJSON.stringify(output))], file.name);
return encryptedFile;
}
// Decrypt uploaded encrypted files. I/O is in arraybuffers.
async decryptFile(message) {
if (message[0] !== '{') {
return;
}
const [vector, cipherText] = splitVectorAndEcryptedData(EJSON.parse(message));
try {
return await decryptAES(vector, this.groupSessionKey, cipherText);
} catch (error) {
this.error('Error decrypting file: ', error);
return false;
}
}
// Encrypts messages
async encryptText(data) {
if (!_.isObject(data)) {
data = new TextEncoder('UTF-8').encode(EJSON.stringify({ text: data, ack: Random.id((Random.fraction() + 1) * 20) }));
}
if (!this.isSupportedRoomType(this.typeOfRoom)) {
return data;
}
const vector = crypto.getRandomValues(new Uint8Array(16));
let result;
try {
result = await encryptAES(vector, this.groupSessionKey, data);
} catch (error) {
return this.error('Error encrypting message: ', error);
}
return this.keyID + Base64.encode(joinVectorAndEcryptedData(vector, result));
}
// Helper function for encryption of messages
encrypt(message) {
let ts;
if (isNaN(TimeSync.serverOffset())) {
ts = new Date();
} else {
ts = new Date(Date.now() + TimeSync.serverOffset());
}
const data = new TextEncoder('UTF-8').encode(EJSON.stringify({
_id: message._id,
text: message.msg,
userId: this.userId,
ts,
}));
return this.encryptText(data);
}
// Decrypt messages
async decryptMessage(message) {
if (message.t !== 'e2e' || message.e2e === 'done') {
return message;
}
const data = await this.decrypt(message.msg);
if (!data?.text) {
return message;
}
return {
...message,
msg: data.text,
e2e: 'done',
};
}
async decrypt(message) {
if (!this.isSupportedRoomType(this.typeOfRoom)) {
return message;
}
const keyID = message.slice(0, 12);
if (keyID !== this.keyID) {
return message;
}
message = message.slice(12);
const [vector, cipherText] = splitVectorAndEcryptedData(Base64.decode(message));
try {
const result = await decryptAES(vector, this.groupSessionKey, cipherText);
return EJSON.parse(new TextDecoder('UTF-8').decode(new Uint8Array(result)));
} catch (error) {
return this.error('Error decrypting message: ', error, message);
}
}
provideKeyToUser(keyId) {
if (this.keyID !== keyId) {
return;
}
this.encryptKeyForOtherParticipants();
}
}
| 27.15914 | 191 | 0.688653 |
83ac5e99ae3026c7917e79e26833e766ae3c340b | 460 | js | JavaScript | sets-maps-symbols/js/06-app.js | iOznny/javascript-poo | 7b6ef38ff6608982788e7b7b0be32ed7d002e158 | [
"MIT"
] | null | null | null | sets-maps-symbols/js/06-app.js | iOznny/javascript-poo | 7b6ef38ff6608982788e7b7b0be32ed7d002e158 | [
"MIT"
] | null | null | null | sets-maps-symbols/js/06-app.js | iOznny/javascript-poo | 7b6ef38ff6608982788e7b7b0be32ed7d002e158 | [
"MIT"
] | null | null | null | // Iterators
function createIterator(car) {
let i = 0;
return {
next: () => {
const end = (i >= car.length);
const value = !end ? car[i++] : undefined;
return { end, value };
}
}
}
const car = ['P1', 'P2', 'P3'];
// Use the iterator
const tourCart = createIterator(car);
console.log(tourCart.next());
console.log(tourCart.next());
console.log(tourCart.next());
console.log(tourCart.next());
| 19.166667 | 54 | 0.55 |
83ac7aa9a76545b5e490c80d9241882ce8f9f757 | 4,973 | js | JavaScript | front_end/media/PlayerListView.js | frontend-arch/devtools-frontend | 907a14259687036ceac26b301d4fc9965327ec11 | [
"BSD-3-Clause"
] | null | null | null | front_end/media/PlayerListView.js | frontend-arch/devtools-frontend | 907a14259687036ceac26b301d4fc9965327ec11 | [
"BSD-3-Clause"
] | null | null | null | front_end/media/PlayerListView.js | frontend-arch/devtools-frontend | 907a14259687036ceac26b301d4fc9965327ec11 | [
"BSD-3-Clause"
] | 4 | 2020-02-09T12:31:17.000Z | 2021-09-02T12:56:58.000Z | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @typedef {{playerTitle: string, playerID: string, exists: boolean, playing: boolean, titleEdited: boolean}}
*/
Media.PlayerStatus;
/**
* @typedef {{playerStatus: !Media.PlayerStatus, playerTitleElement: ?HTMLElement}}
*/
Media.PlayerStatusMapElement;
Media.PlayerEntryTreeElement = class extends UI.TreeElement {
/**
* @param {!Media.PlayerStatus} playerStatus
* @param {!Media.MainView} displayContainer
*/
constructor(playerStatus, displayContainer) {
super(playerStatus.playerTitle, false);
this.titleFromUrl = true;
this._playerStatus = playerStatus;
this._displayContainer = displayContainer;
this.setLeadingIcons([UI.Icon.create('smallicon-videoplayer-playing', 'media-player')]);
}
/**
* @override
* @return {boolean}
*/
onselect(selectedByUser) {
this._displayContainer.renderMainPanel(this._playerStatus.playerID);
return true;
}
};
Media.PlayerListView = class extends UI.VBox {
/**
* @param {!Media.MainView} mainContainer
*/
constructor(mainContainer) {
super(true);
this._playerStatuses = new Map();
// Container where new panels can be added based on clicks.
this._mainContainer = mainContainer;
// The parent tree for storing sections
this._sidebarTree = new UI.TreeOutlineInShadow();
this.contentElement.appendChild(this._sidebarTree.element);
this._sidebarTree.registerRequiredCSS('media/playerListView.css');
// Audio capture / output devices.
this._audioDevices = this._addListSection(Common.UIString('Audio I/O'));
// Video capture devices.
this._videoDevices = this._addListSection(Common.UIString('Video Capture Devices'));
// Players active in this tab.
this._playerList = this._addListSection(Common.UIString('Players'));
}
/**
* @param {string} title
* @return {!UI.TreeElement}
*/
_addListSection(title) {
const treeElement = new UI.TreeElement(title, true);
treeElement.listItemElement.classList.add('storage-group-list-item');
treeElement.setCollapsible(false);
treeElement.selectable = false;
this._sidebarTree.appendChild(treeElement);
return treeElement;
}
/**
* @param {string} playerID
*/
addMediaElementItem(playerID) {
const playerStatus = {playerTitle: playerID, playerID: playerID, exists: true, playing: false, titleEdited: false};
const playerElement = new Media.PlayerEntryTreeElement(playerStatus, this._mainContainer);
this._playerStatuses.set(playerID, playerElement);
this._playerList.appendChild(playerElement);
}
/**
* @param {string} playerID
* @param {string} newTitle
* @param {boolean} isTitleExtractedFromUrl
*/
setMediaElementPlayerTitle(playerID, newTitle, isTitleExtractedFromUrl) {
if (this._playerStatuses.has(playerID)) {
const sidebarEntry = this._playerStatuses.get(playerID);
if (!isTitleExtractedFromUrl || sidebarEntry.titleFromUrl) {
sidebarEntry.title = newTitle;
sidebarEntry.titleFromUrl = isTitleExtractedFromUrl;
}
}
}
/**
* @param {string} playerID
* @param {string} iconName
*/
setMediaElementPlayerIcon(playerID, iconName) {
if (this._playerStatuses.has(playerID)) {
const sidebarEntry = this._playerStatuses.get(playerID);
sidebarEntry.setLeadingIcons([UI.Icon.create('smallicon-videoplayer-' + iconName, 'media-player')]);
}
}
/**
* @param {string} playerID
* @param {!Array.<!Media.Event>} changes
* @param {string} changeType
*/
renderChanges(playerID, changes, changeType) {
// We only want to try setting the title from the 'frame_title' and 'frame_url' properties.
if (changeType === Media.MediaModel.MediaChangeTypeKeys.Property) {
for (const change of changes) {
// Sometimes frame_title can be an empty string.
if (change.name === 'frame_title' && change.value) {
this.setMediaElementPlayerTitle(playerID, change.value, false);
}
if (change.name === 'frame_url') {
const url_path_component = change.value.substring(change.value.lastIndexOf('/') + 1);
this.setMediaElementPlayerTitle(playerID, url_path_component, true);
}
}
}
if (changeType === Media.MediaModel.MediaChangeTypeKeys.Event) {
let change_to = null;
for (const change of changes) {
if (change.name === 'Event') {
if (change.value === 'PLAY') {
change_to = 'playing';
} else if (change.value === 'PAUSE') {
change_to = 'paused';
} else if (change.value === 'WEBMEDIAPLAYER_DESTROYED') {
change_to = 'destroyed';
}
}
}
if (change_to) {
this.setMediaElementPlayerIcon(playerID, change_to);
}
}
}
};
| 31.878205 | 119 | 0.67585 |
83acc8a7d842feb71220681dbe3e8618d17e2e07 | 82 | js | JavaScript | src/js/views/scenes/calendar/components/body/initState.js | AurelianSpodarec/JS_GitHub_Replica | 6adf624db7557b4bc4fff2fffa2735e7ae920d42 | [
"MIT"
] | 2 | 2019-03-07T04:25:06.000Z | 2019-07-05T13:52:45.000Z | src/js/views/scenes/calendar/components/body/initState.js | AurelianSpodarec/Hobo_Dashboard | 6adf624db7557b4bc4fff2fffa2735e7ae920d42 | [
"MIT"
] | null | null | null | src/js/views/scenes/calendar/components/body/initState.js | AurelianSpodarec/Hobo_Dashboard | 6adf624db7557b4bc4fff2fffa2735e7ae920d42 | [
"MIT"
] | null | null | null | export default {
selectedDayCellId: "",
day: {
events: [],
}
} | 13.666667 | 26 | 0.47561 |
83acd0f8aaeb6233ad334d3d60f00b5952a71159 | 1,144 | js | JavaScript | src/dev/Services/Response/index.js | HubTester1/HubAPI | d6e83c5f4658570883e797b2bd071552e779959b | [
"MIT"
] | null | null | null | src/dev/Services/Response/index.js | HubTester1/HubAPI | d6e83c5f4658570883e797b2bd071552e779959b | [
"MIT"
] | 1 | 2021-08-31T20:49:34.000Z | 2021-08-31T20:49:34.000Z | src/dev/Services/Response/index.js | HubTester1/HubAPI | d6e83c5f4658570883e797b2bd071552e779959b | [
"MIT"
] | null | null | null | /**
* @name Response
* @service
* @description Handles responses to requests and cron initiations.
*/
const Log = require('log');
module.exports = {
/**
* @name HandleResponse
* @function
* @async
* @description Given data and response function, log request,
* use function to respond to request, and, as needed,
* process error.
* @param {...Response} incomingResponse - {@link Response} object
*/
HandleResponse: ({
processError,
emergencyError,
statusCode,
responder,
content,
}) => {
// set up vars
let returnValue;
const logValue = content;
// if there's a status code
if (statusCode) {
// add status code to log value
logValue.statusCode = statusCode;
// set returnValue to a Lambda function HTTP response
returnValue = {
statusCode,
headers: {
'Access-Control-Allow-Origin': '*',
},
body: JSON.stringify(content),
};
// if there's no status code
} else {
// set returnValue to content
returnValue = content;
}
// log content
Log.Log(logValue);
// respond with return value, using responder function
responder(returnValue);
},
};
| 20.8 | 67 | 0.652972 |
83acd10d80b5df1210785782fd37a928bdd8c639 | 1,020 | js | JavaScript | scripts/index.js | ptrgoryl/KoC | 02df9cd0785972a1b72386715ecb7209b214f7ce | [
"Apache-2.0"
] | null | null | null | scripts/index.js | ptrgoryl/KoC | 02df9cd0785972a1b72386715ecb7209b214f7ce | [
"Apache-2.0"
] | 3 | 2015-04-18T14:18:01.000Z | 2015-04-18T14:24:13.000Z | scripts/index.js | ptrgoryl/KoC | 02df9cd0785972a1b72386715ecb7209b214f7ce | [
"Apache-2.0"
] | null | null | null | // For an introduction to the Blank template, see the following documentation:
// http://go.microsoft.com/fwlink/?LinkID=397704
// To debug code on page load in Ripple or on Android devices/emulators: launch your app, set breakpoints,
// and then run "window.location.reload()" in the JavaScript Console.
(function () {
"use strict";
document.addEventListener( 'deviceready', onDeviceReady.bind( this ), false );
function onDeviceReady() {
// Handle the Cordova pause and resume events
document.addEventListener( 'pause', onPause.bind( this ), false );
document.addEventListener( 'resume', onResume.bind( this ), false );
// TODO: Cordova has been loaded. Perform any initialization that requires Cordova here.
};
function onPause() {
// TODO: This application has been suspended. Save application state here.
};
function onResume() {
// TODO: This application has been reactivated. Restore application state here.
};
} )(); | 39.230769 | 107 | 0.680392 |
83acdc0f4468f54c19d91ef6166f4bb6ea83327e | 702 | js | JavaScript | src/component/main/contact-form/index.js | sdmccoy/portfolio | ddf3b8da09c166b92713db846caec8d2ae2729cd | [
"MIT"
] | null | null | null | src/component/main/contact-form/index.js | sdmccoy/portfolio | ddf3b8da09c166b92713db846caec8d2ae2729cd | [
"MIT"
] | 5 | 2017-05-10T03:30:04.000Z | 2017-05-22T15:48:55.000Z | src/component/main/contact-form/index.js | sdmccoy/portfolio | ddf3b8da09c166b92713db846caec8d2ae2729cd | [
"MIT"
] | 2 | 2017-05-15T22:57:35.000Z | 2017-05-22T15:05:10.000Z | import React from 'react';
import {Link} from 'react-router-dom';
import './_contact-form.scss';
class ContactForm extends React.Component {
constructor(props){
super(props);
this.state = {
};
}
render(){
return(
<div className='contact-container'>
<h2 className='headline'>
CONTACT
</h2>
<h4>Peruse, Connect, and Message!</h4>
<div className='linkedin-container'>
<Link to='https://www.linkedin.com/in/sdmccoy/' className='nav-icon' target='_blank'>
<i className='fa fa-linkedin-square' aria-hidden='true'></i>
</Link>
</div>
</div>
);
}
}
export default ContactForm;
| 21.9375 | 101 | 0.576923 |
83ad963dde77719b80bddcd5ecbab2c1ac462c71 | 916 | js | JavaScript | src/ui/project.js | WheresHJ/housing-finder | d4b482eba67e46f4eeebd68b0c15ce7641af9db1 | [
"MIT"
] | null | null | null | src/ui/project.js | WheresHJ/housing-finder | d4b482eba67e46f4eeebd68b0c15ce7641af9db1 | [
"MIT"
] | null | null | null | src/ui/project.js | WheresHJ/housing-finder | d4b482eba67e46f4eeebd68b0c15ce7641af9db1 | [
"MIT"
] | null | null | null | define(function(require, exports, module) {
'use strict';
var flight = require('flight');
var $ = require('jquery');
var _ = require('lodash');
var stripHtml = function(html) {
return $("<div/>").html(html).text();
};
module.exports = flight.component(function project() {
this.configureProject = function(ev, config) {
_.mapValues(
config.project,
function(value, key) {
// find everything with data-project="key", and replace the HTML
// with what's in the configuration
$("*[data-project=" + key + "]").html(value);
// set meta fields to the text value
$("meta[name=" + key + "]").attr(
'content', stripHtml(value));
});
};
this.after('initialize', function() {
this.on(document, 'config', this.configureProject);
});
});
});
| 30.533333 | 76 | 0.534934 |
83adf8e5dc11e4dfdbf4f031501f8fa1269777da | 629 | js | JavaScript | Meetup 1/problem2.1.js | ChrisBellew/perthcodingchallenges | fd8e87b35e99db97b3ea13ce5c32c7a0abe12b46 | [
"MIT"
] | null | null | null | Meetup 1/problem2.1.js | ChrisBellew/perthcodingchallenges | fd8e87b35e99db97b3ea13ce5c32c7a0abe12b46 | [
"MIT"
] | null | null | null | Meetup 1/problem2.1.js | ChrisBellew/perthcodingchallenges | fd8e87b35e99db97b3ea13ce5c32c7a0abe12b46 | [
"MIT"
] | null | null | null | // https://projecteuler.net/problem=2
// http://thejavamathematician.blogspot.com.au/2015/01/4-ways-to-generate-fibonacci-numbers.html
var answer = 4613732;
var maxFib = 4000000;
var sum = 0;
var fibs = [];
fibs[0] = 0;
fibs[1] = 1;
var current = 0;
var next = 1;
// Generate fibonacci sequence
do {
fibs[next] = fibs[current] + fibs[next];
current = next;
next = (current === 0) ? 1 : 0;
// If result is even number, add to sum
if (fibs[next] % 2 === 0) {
sum += fibs[next];
}
}while (fibs[next] < maxFib);
console.log(sum + ' is ' + ((sum === answer) ? 'correct':'incorrect')); | 20.290323 | 96 | 0.591415 |
83ae1e45b649e55629e86e31f2ab7ffc4ae726d4 | 179 | js | JavaScript | modules/stream-effects/index.js | SariskaIO/sariska-media-transport | 2bf01d761b03e2ce3b1ad0c10ca8266e7862eb1e | [
"Apache-2.0"
] | null | null | null | modules/stream-effects/index.js | SariskaIO/sariska-media-transport | 2bf01d761b03e2ce3b1ad0c10ca8266e7862eb1e | [
"Apache-2.0"
] | null | null | null | modules/stream-effects/index.js | SariskaIO/sariska-media-transport | 2bf01d761b03e2ce3b1ad0c10ca8266e7862eb1e | [
"Apache-2.0"
] | null | null | null | export * from './audio-mixer/AudioMixerEffect';
export * from './presenter';
export * from './rnnoise';
export * from './screenshot-capture';
export * from './virtual-background'; | 35.8 | 47 | 0.703911 |
83aef172ae74b575695160a4722d7fdcfe7253b3 | 201,810 | js | JavaScript | dist/lamden.js | Lamden/lamden-js | 082420434ca075b2cdc0531b9726ab150fdcdb25 | [
"MIT"
] | 15 | 2020-01-15T01:18:44.000Z | 2022-02-15T20:55:40.000Z | dist/lamden.js | Lamden/lamden-js | 082420434ca075b2cdc0531b9726ab150fdcdb25 | [
"MIT"
] | 21 | 2020-06-08T22:11:30.000Z | 2022-03-09T19:45:14.000Z | dist/lamden.js | Lamden/lamden-js | 082420434ca075b2cdc0531b9726ab150fdcdb25 | [
"MIT"
] | 21 | 2020-06-12T21:31:22.000Z | 2021-11-25T20:45:02.000Z | 'use strict';
var global$1 = (typeof global !== "undefined" ? global :
typeof self !== "undefined" ? self :
typeof window !== "undefined" ? window : {});
var lookup = [];
var revLookup = [];
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
var inited = false;
function init () {
inited = true;
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
for (var i = 0, len = code.length; i < len; ++i) {
lookup[i] = code[i];
revLookup[code.charCodeAt(i)] = i;
}
revLookup['-'.charCodeAt(0)] = 62;
revLookup['_'.charCodeAt(0)] = 63;
}
function toByteArray (b64) {
if (!inited) {
init();
}
var i, j, l, tmp, placeHolders, arr;
var len = b64.length;
if (len % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
}
// the number of equal signs (place holders)
// if there are two placeholders, than the two characters before it
// represent one byte
// if there is only one, then the three characters before it represent 2 bytes
// this is just a cheap hack to not do indexOf twice
placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0;
// base64 is 4/3 + up to two characters of the original data
arr = new Arr(len * 3 / 4 - placeHolders);
// if there are placeholders, only get up to the last complete 4 chars
l = placeHolders > 0 ? len - 4 : len;
var L = 0;
for (i = 0, j = 0; i < l; i += 4, j += 3) {
tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)];
arr[L++] = (tmp >> 16) & 0xFF;
arr[L++] = (tmp >> 8) & 0xFF;
arr[L++] = tmp & 0xFF;
}
if (placeHolders === 2) {
tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4);
arr[L++] = tmp & 0xFF;
} else if (placeHolders === 1) {
tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2);
arr[L++] = (tmp >> 8) & 0xFF;
arr[L++] = tmp & 0xFF;
}
return arr
}
function tripletToBase64 (num) {
return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
}
function encodeChunk (uint8, start, end) {
var tmp;
var output = [];
for (var i = start; i < end; i += 3) {
tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]);
output.push(tripletToBase64(tmp));
}
return output.join('')
}
function fromByteArray (uint8) {
if (!inited) {
init();
}
var tmp;
var len = uint8.length;
var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
var output = '';
var parts = [];
var maxChunkLength = 16383; // must be multiple of 3
// go through the array every three bytes, we'll deal with trailing stuff later
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)));
}
// pad the end with zeros, but make sure to not forget the extra bytes
if (extraBytes === 1) {
tmp = uint8[len - 1];
output += lookup[tmp >> 2];
output += lookup[(tmp << 4) & 0x3F];
output += '==';
} else if (extraBytes === 2) {
tmp = (uint8[len - 2] << 8) + (uint8[len - 1]);
output += lookup[tmp >> 10];
output += lookup[(tmp >> 4) & 0x3F];
output += lookup[(tmp << 2) & 0x3F];
output += '=';
}
parts.push(output);
return parts.join('')
}
function read (buffer, offset, isLE, mLen, nBytes) {
var e, m;
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var nBits = -7;
var i = isLE ? (nBytes - 1) : 0;
var d = isLE ? -1 : 1;
var s = buffer[offset + i];
i += d;
e = s & ((1 << (-nBits)) - 1);
s >>= (-nBits);
nBits += eLen;
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
m = e & ((1 << (-nBits)) - 1);
e >>= (-nBits);
nBits += mLen;
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
if (e === 0) {
e = 1 - eBias;
} else if (e === eMax) {
return m ? NaN : ((s ? -1 : 1) * Infinity)
} else {
m = m + Math.pow(2, mLen);
e = e - eBias;
}
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
}
function write (buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c;
var eLen = nBytes * 8 - mLen - 1;
var eMax = (1 << eLen) - 1;
var eBias = eMax >> 1;
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);
var i = isLE ? 0 : (nBytes - 1);
var d = isLE ? 1 : -1;
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;
value = Math.abs(value);
if (isNaN(value) || value === Infinity) {
m = isNaN(value) ? 1 : 0;
e = eMax;
} else {
e = Math.floor(Math.log(value) / Math.LN2);
if (value * (c = Math.pow(2, -e)) < 1) {
e--;
c *= 2;
}
if (e + eBias >= 1) {
value += rt / c;
} else {
value += rt * Math.pow(2, 1 - eBias);
}
if (value * c >= 2) {
e++;
c /= 2;
}
if (e + eBias >= eMax) {
m = 0;
e = eMax;
} else if (e + eBias >= 1) {
m = (value * c - 1) * Math.pow(2, mLen);
e = e + eBias;
} else {
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
e = 0;
}
}
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
e = (e << mLen) | m;
eLen += mLen;
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
buffer[offset + i - d] |= s * 128;
}
var toString = {}.toString;
var isArray = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
var INSPECT_MAX_BYTES = 50;
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
* === false Use Object implementation (most compatible, even IE6)
*
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
* Opera 11.6+, iOS 4.2+.
*
* Due to various browser bugs, sometimes the Object implementation will be used even
* when the browser supports typed arrays.
*
* Note:
*
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
*
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
*
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
* incorrect length in some situations.
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
* get the Object implementation, which is slower but behaves correctly.
*/
Buffer.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined
? global$1.TYPED_ARRAY_SUPPORT
: true;
function kMaxLength () {
return Buffer.TYPED_ARRAY_SUPPORT
? 0x7fffffff
: 0x3fffffff
}
function createBuffer (that, length) {
if (kMaxLength() < length) {
throw new RangeError('Invalid typed array length')
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = new Uint8Array(length);
that.__proto__ = Buffer.prototype;
} else {
// Fallback: Return an object instance of the Buffer class
if (that === null) {
that = new Buffer(length);
}
that.length = length;
}
return that
}
/**
* The Buffer constructor returns instances of `Uint8Array` that have their
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
* returns a single octet.
*
* The `Uint8Array` prototype remains unmodified.
*/
function Buffer (arg, encodingOrOffset, length) {
if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
return new Buffer(arg, encodingOrOffset, length)
}
// Common case.
if (typeof arg === 'number') {
if (typeof encodingOrOffset === 'string') {
throw new Error(
'If encoding is specified then the first argument must be a string'
)
}
return allocUnsafe(this, arg)
}
return from(this, arg, encodingOrOffset, length)
}
Buffer.poolSize = 8192; // not used by this implementation
// TODO: Legacy, not needed anymore. Remove in next major version.
Buffer._augment = function (arr) {
arr.__proto__ = Buffer.prototype;
return arr
};
function from (that, value, encodingOrOffset, length) {
if (typeof value === 'number') {
throw new TypeError('"value" argument must not be a number')
}
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
return fromArrayBuffer(that, value, encodingOrOffset, length)
}
if (typeof value === 'string') {
return fromString(that, value, encodingOrOffset)
}
return fromObject(that, value)
}
/**
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
* if value is a number.
* Buffer.from(str[, encoding])
* Buffer.from(array)
* Buffer.from(buffer)
* Buffer.from(arrayBuffer[, byteOffset[, length]])
**/
Buffer.from = function (value, encodingOrOffset, length) {
return from(null, value, encodingOrOffset, length)
};
if (Buffer.TYPED_ARRAY_SUPPORT) {
Buffer.prototype.__proto__ = Uint8Array.prototype;
Buffer.__proto__ = Uint8Array;
}
function assertSize (size) {
if (typeof size !== 'number') {
throw new TypeError('"size" argument must be a number')
} else if (size < 0) {
throw new RangeError('"size" argument must not be negative')
}
}
function alloc (that, size, fill, encoding) {
assertSize(size);
if (size <= 0) {
return createBuffer(that, size)
}
if (fill !== undefined) {
// Only pay attention to encoding if it's a string. This
// prevents accidentally sending in a number that would
// be interpretted as a start offset.
return typeof encoding === 'string'
? createBuffer(that, size).fill(fill, encoding)
: createBuffer(that, size).fill(fill)
}
return createBuffer(that, size)
}
/**
* Creates a new filled Buffer instance.
* alloc(size[, fill[, encoding]])
**/
Buffer.alloc = function (size, fill, encoding) {
return alloc(null, size, fill, encoding)
};
function allocUnsafe (that, size) {
assertSize(size);
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);
if (!Buffer.TYPED_ARRAY_SUPPORT) {
for (var i = 0; i < size; ++i) {
that[i] = 0;
}
}
return that
}
/**
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
* */
Buffer.allocUnsafe = function (size) {
return allocUnsafe(null, size)
};
/**
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
*/
Buffer.allocUnsafeSlow = function (size) {
return allocUnsafe(null, size)
};
function fromString (that, string, encoding) {
if (typeof encoding !== 'string' || encoding === '') {
encoding = 'utf8';
}
if (!Buffer.isEncoding(encoding)) {
throw new TypeError('"encoding" must be a valid string encoding')
}
var length = byteLength(string, encoding) | 0;
that = createBuffer(that, length);
var actual = that.write(string, encoding);
if (actual !== length) {
// Writing a hex string, for example, that contains invalid characters will
// cause everything after the first invalid character to be ignored. (e.g.
// 'abxxcd' will be treated as 'ab')
that = that.slice(0, actual);
}
return that
}
function fromArrayLike (that, array) {
var length = array.length < 0 ? 0 : checked(array.length) | 0;
that = createBuffer(that, length);
for (var i = 0; i < length; i += 1) {
that[i] = array[i] & 255;
}
return that
}
function fromArrayBuffer (that, array, byteOffset, length) {
array.byteLength; // this throws if `array` is not a valid ArrayBuffer
if (byteOffset < 0 || array.byteLength < byteOffset) {
throw new RangeError('\'offset\' is out of bounds')
}
if (array.byteLength < byteOffset + (length || 0)) {
throw new RangeError('\'length\' is out of bounds')
}
if (byteOffset === undefined && length === undefined) {
array = new Uint8Array(array);
} else if (length === undefined) {
array = new Uint8Array(array, byteOffset);
} else {
array = new Uint8Array(array, byteOffset, length);
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = array;
that.__proto__ = Buffer.prototype;
} else {
// Fallback: Return an object instance of the Buffer class
that = fromArrayLike(that, array);
}
return that
}
function fromObject (that, obj) {
if (internalIsBuffer(obj)) {
var len = checked(obj.length) | 0;
that = createBuffer(that, len);
if (that.length === 0) {
return that
}
obj.copy(that, 0, 0, len);
return that
}
if (obj) {
if ((typeof ArrayBuffer !== 'undefined' &&
obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
if (typeof obj.length !== 'number' || isnan(obj.length)) {
return createBuffer(that, 0)
}
return fromArrayLike(that, obj)
}
if (obj.type === 'Buffer' && isArray(obj.data)) {
return fromArrayLike(that, obj.data)
}
}
throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
}
function checked (length) {
// Note: cannot use `length < kMaxLength()` here because that fails when
// length is NaN (which is otherwise coerced to zero.)
if (length >= kMaxLength()) {
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
'size: 0x' + kMaxLength().toString(16) + ' bytes')
}
return length | 0
}
Buffer.isBuffer = isBuffer;
function internalIsBuffer (b) {
return !!(b != null && b._isBuffer)
}
Buffer.compare = function compare (a, b) {
if (!internalIsBuffer(a) || !internalIsBuffer(b)) {
throw new TypeError('Arguments must be Buffers')
}
if (a === b) return 0
var x = a.length;
var y = b.length;
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
if (a[i] !== b[i]) {
x = a[i];
y = b[i];
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
};
Buffer.isEncoding = function isEncoding (encoding) {
switch (String(encoding).toLowerCase()) {
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'latin1':
case 'binary':
case 'base64':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return true
default:
return false
}
};
Buffer.concat = function concat (list, length) {
if (!isArray(list)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
if (list.length === 0) {
return Buffer.alloc(0)
}
var i;
if (length === undefined) {
length = 0;
for (i = 0; i < list.length; ++i) {
length += list[i].length;
}
}
var buffer = Buffer.allocUnsafe(length);
var pos = 0;
for (i = 0; i < list.length; ++i) {
var buf = list[i];
if (!internalIsBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
buf.copy(buffer, pos);
pos += buf.length;
}
return buffer
};
function byteLength (string, encoding) {
if (internalIsBuffer(string)) {
return string.length
}
if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
(ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
return string.byteLength
}
if (typeof string !== 'string') {
string = '' + string;
}
var len = string.length;
if (len === 0) return 0
// Use a for loop to avoid recursion
var loweredCase = false;
for (;;) {
switch (encoding) {
case 'ascii':
case 'latin1':
case 'binary':
return len
case 'utf8':
case 'utf-8':
case undefined:
return utf8ToBytes(string).length
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return len * 2
case 'hex':
return len >>> 1
case 'base64':
return base64ToBytes(string).length
default:
if (loweredCase) return utf8ToBytes(string).length // assume utf8
encoding = ('' + encoding).toLowerCase();
loweredCase = true;
}
}
}
Buffer.byteLength = byteLength;
function slowToString (encoding, start, end) {
var loweredCase = false;
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
// property of a typed array.
// This behaves neither like String nor Uint8Array in that we set start/end
// to their upper/lower bounds if the value passed is out of range.
// undefined is handled specially as per ECMA-262 6th Edition,
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
if (start === undefined || start < 0) {
start = 0;
}
// Return early if start > this.length. Done here to prevent potential uint32
// coercion fail below.
if (start > this.length) {
return ''
}
if (end === undefined || end > this.length) {
end = this.length;
}
if (end <= 0) {
return ''
}
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
end >>>= 0;
start >>>= 0;
if (end <= start) {
return ''
}
if (!encoding) encoding = 'utf8';
while (true) {
switch (encoding) {
case 'hex':
return hexSlice(this, start, end)
case 'utf8':
case 'utf-8':
return utf8Slice(this, start, end)
case 'ascii':
return asciiSlice(this, start, end)
case 'latin1':
case 'binary':
return latin1Slice(this, start, end)
case 'base64':
return base64Slice(this, start, end)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return utf16leSlice(this, start, end)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = (encoding + '').toLowerCase();
loweredCase = true;
}
}
}
// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
// Buffer instances.
Buffer.prototype._isBuffer = true;
function swap (b, n, m) {
var i = b[n];
b[n] = b[m];
b[m] = i;
}
Buffer.prototype.swap16 = function swap16 () {
var len = this.length;
if (len % 2 !== 0) {
throw new RangeError('Buffer size must be a multiple of 16-bits')
}
for (var i = 0; i < len; i += 2) {
swap(this, i, i + 1);
}
return this
};
Buffer.prototype.swap32 = function swap32 () {
var len = this.length;
if (len % 4 !== 0) {
throw new RangeError('Buffer size must be a multiple of 32-bits')
}
for (var i = 0; i < len; i += 4) {
swap(this, i, i + 3);
swap(this, i + 1, i + 2);
}
return this
};
Buffer.prototype.swap64 = function swap64 () {
var len = this.length;
if (len % 8 !== 0) {
throw new RangeError('Buffer size must be a multiple of 64-bits')
}
for (var i = 0; i < len; i += 8) {
swap(this, i, i + 7);
swap(this, i + 1, i + 6);
swap(this, i + 2, i + 5);
swap(this, i + 3, i + 4);
}
return this
};
Buffer.prototype.toString = function toString () {
var length = this.length | 0;
if (length === 0) return ''
if (arguments.length === 0) return utf8Slice(this, 0, length)
return slowToString.apply(this, arguments)
};
Buffer.prototype.equals = function equals (b) {
if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')
if (this === b) return true
return Buffer.compare(this, b) === 0
};
Buffer.prototype.inspect = function inspect () {
var str = '';
var max = INSPECT_MAX_BYTES;
if (this.length > 0) {
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');
if (this.length > max) str += ' ... ';
}
return '<Buffer ' + str + '>'
};
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
if (!internalIsBuffer(target)) {
throw new TypeError('Argument must be a Buffer')
}
if (start === undefined) {
start = 0;
}
if (end === undefined) {
end = target ? target.length : 0;
}
if (thisStart === undefined) {
thisStart = 0;
}
if (thisEnd === undefined) {
thisEnd = this.length;
}
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
throw new RangeError('out of range index')
}
if (thisStart >= thisEnd && start >= end) {
return 0
}
if (thisStart >= thisEnd) {
return -1
}
if (start >= end) {
return 1
}
start >>>= 0;
end >>>= 0;
thisStart >>>= 0;
thisEnd >>>= 0;
if (this === target) return 0
var x = thisEnd - thisStart;
var y = end - start;
var len = Math.min(x, y);
var thisCopy = this.slice(thisStart, thisEnd);
var targetCopy = target.slice(start, end);
for (var i = 0; i < len; ++i) {
if (thisCopy[i] !== targetCopy[i]) {
x = thisCopy[i];
y = targetCopy[i];
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
};
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
//
// Arguments:
// - buffer - a Buffer to search
// - val - a string, Buffer, or number
// - byteOffset - an index into `buffer`; will be clamped to an int32
// - encoding - an optional encoding, relevant is val is a string
// - dir - true for indexOf, false for lastIndexOf
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
// Empty buffer means no match
if (buffer.length === 0) return -1
// Normalize byteOffset
if (typeof byteOffset === 'string') {
encoding = byteOffset;
byteOffset = 0;
} else if (byteOffset > 0x7fffffff) {
byteOffset = 0x7fffffff;
} else if (byteOffset < -0x80000000) {
byteOffset = -0x80000000;
}
byteOffset = +byteOffset; // Coerce to Number.
if (isNaN(byteOffset)) {
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
byteOffset = dir ? 0 : (buffer.length - 1);
}
// Normalize byteOffset: negative offsets start from the end of the buffer
if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
if (byteOffset >= buffer.length) {
if (dir) return -1
else byteOffset = buffer.length - 1;
} else if (byteOffset < 0) {
if (dir) byteOffset = 0;
else return -1
}
// Normalize val
if (typeof val === 'string') {
val = Buffer.from(val, encoding);
}
// Finally, search either indexOf (if dir is true) or lastIndexOf
if (internalIsBuffer(val)) {
// Special case: looking for empty string/buffer always fails
if (val.length === 0) {
return -1
}
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
} else if (typeof val === 'number') {
val = val & 0xFF; // Search for a byte value [0-255]
if (Buffer.TYPED_ARRAY_SUPPORT &&
typeof Uint8Array.prototype.indexOf === 'function') {
if (dir) {
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
} else {
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
}
}
return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
}
throw new TypeError('val must be string, number or Buffer')
}
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
var indexSize = 1;
var arrLength = arr.length;
var valLength = val.length;
if (encoding !== undefined) {
encoding = String(encoding).toLowerCase();
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
encoding === 'utf16le' || encoding === 'utf-16le') {
if (arr.length < 2 || val.length < 2) {
return -1
}
indexSize = 2;
arrLength /= 2;
valLength /= 2;
byteOffset /= 2;
}
}
function read (buf, i) {
if (indexSize === 1) {
return buf[i]
} else {
return buf.readUInt16BE(i * indexSize)
}
}
var i;
if (dir) {
var foundIndex = -1;
for (i = byteOffset; i < arrLength; i++) {
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
if (foundIndex === -1) foundIndex = i;
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
} else {
if (foundIndex !== -1) i -= i - foundIndex;
foundIndex = -1;
}
}
} else {
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
for (i = byteOffset; i >= 0; i--) {
var found = true;
for (var j = 0; j < valLength; j++) {
if (read(arr, i + j) !== read(val, j)) {
found = false;
break
}
}
if (found) return i
}
}
return -1
}
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
return this.indexOf(val, byteOffset, encoding) !== -1
};
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
};
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
};
function hexWrite (buf, string, offset, length) {
offset = Number(offset) || 0;
var remaining = buf.length - offset;
if (!length) {
length = remaining;
} else {
length = Number(length);
if (length > remaining) {
length = remaining;
}
}
// must be an even number of digits
var strLen = string.length;
if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
if (length > strLen / 2) {
length = strLen / 2;
}
for (var i = 0; i < length; ++i) {
var parsed = parseInt(string.substr(i * 2, 2), 16);
if (isNaN(parsed)) return i
buf[offset + i] = parsed;
}
return i
}
function utf8Write (buf, string, offset, length) {
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
}
function asciiWrite (buf, string, offset, length) {
return blitBuffer(asciiToBytes(string), buf, offset, length)
}
function latin1Write (buf, string, offset, length) {
return asciiWrite(buf, string, offset, length)
}
function base64Write (buf, string, offset, length) {
return blitBuffer(base64ToBytes(string), buf, offset, length)
}
function ucs2Write (buf, string, offset, length) {
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
}
Buffer.prototype.write = function write (string, offset, length, encoding) {
// Buffer#write(string)
if (offset === undefined) {
encoding = 'utf8';
length = this.length;
offset = 0;
// Buffer#write(string, encoding)
} else if (length === undefined && typeof offset === 'string') {
encoding = offset;
length = this.length;
offset = 0;
// Buffer#write(string, offset[, length][, encoding])
} else if (isFinite(offset)) {
offset = offset | 0;
if (isFinite(length)) {
length = length | 0;
if (encoding === undefined) encoding = 'utf8';
} else {
encoding = length;
length = undefined;
}
// legacy write(string, encoding, offset, length) - remove in v0.13
} else {
throw new Error(
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
)
}
var remaining = this.length - offset;
if (length === undefined || length > remaining) length = remaining;
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
throw new RangeError('Attempt to write outside buffer bounds')
}
if (!encoding) encoding = 'utf8';
var loweredCase = false;
for (;;) {
switch (encoding) {
case 'hex':
return hexWrite(this, string, offset, length)
case 'utf8':
case 'utf-8':
return utf8Write(this, string, offset, length)
case 'ascii':
return asciiWrite(this, string, offset, length)
case 'latin1':
case 'binary':
return latin1Write(this, string, offset, length)
case 'base64':
// Warning: maxLength not taken into account in base64Write
return base64Write(this, string, offset, length)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return ucs2Write(this, string, offset, length)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = ('' + encoding).toLowerCase();
loweredCase = true;
}
}
};
Buffer.prototype.toJSON = function toJSON () {
return {
type: 'Buffer',
data: Array.prototype.slice.call(this._arr || this, 0)
}
};
function base64Slice (buf, start, end) {
if (start === 0 && end === buf.length) {
return fromByteArray(buf)
} else {
return fromByteArray(buf.slice(start, end))
}
}
function utf8Slice (buf, start, end) {
end = Math.min(buf.length, end);
var res = [];
var i = start;
while (i < end) {
var firstByte = buf[i];
var codePoint = null;
var bytesPerSequence = (firstByte > 0xEF) ? 4
: (firstByte > 0xDF) ? 3
: (firstByte > 0xBF) ? 2
: 1;
if (i + bytesPerSequence <= end) {
var secondByte, thirdByte, fourthByte, tempCodePoint;
switch (bytesPerSequence) {
case 1:
if (firstByte < 0x80) {
codePoint = firstByte;
}
break
case 2:
secondByte = buf[i + 1];
if ((secondByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);
if (tempCodePoint > 0x7F) {
codePoint = tempCodePoint;
}
}
break
case 3:
secondByte = buf[i + 1];
thirdByte = buf[i + 2];
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
codePoint = tempCodePoint;
}
}
break
case 4:
secondByte = buf[i + 1];
thirdByte = buf[i + 2];
fourthByte = buf[i + 3];
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
codePoint = tempCodePoint;
}
}
}
}
if (codePoint === null) {
// we did not generate a valid codePoint so insert a
// replacement char (U+FFFD) and advance only 1 byte
codePoint = 0xFFFD;
bytesPerSequence = 1;
} else if (codePoint > 0xFFFF) {
// encode to utf16 (surrogate pair dance)
codePoint -= 0x10000;
res.push(codePoint >>> 10 & 0x3FF | 0xD800);
codePoint = 0xDC00 | codePoint & 0x3FF;
}
res.push(codePoint);
i += bytesPerSequence;
}
return decodeCodePointsArray(res)
}
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
// the lowest limit is Chrome, with 0x10000 args.
// We go 1 magnitude less, for safety
var MAX_ARGUMENTS_LENGTH = 0x1000;
function decodeCodePointsArray (codePoints) {
var len = codePoints.length;
if (len <= MAX_ARGUMENTS_LENGTH) {
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
}
// Decode in chunks to avoid "call stack size exceeded".
var res = '';
var i = 0;
while (i < len) {
res += String.fromCharCode.apply(
String,
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
);
}
return res
}
function asciiSlice (buf, start, end) {
var ret = '';
end = Math.min(buf.length, end);
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i] & 0x7F);
}
return ret
}
function latin1Slice (buf, start, end) {
var ret = '';
end = Math.min(buf.length, end);
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i]);
}
return ret
}
function hexSlice (buf, start, end) {
var len = buf.length;
if (!start || start < 0) start = 0;
if (!end || end < 0 || end > len) end = len;
var out = '';
for (var i = start; i < end; ++i) {
out += toHex(buf[i]);
}
return out
}
function utf16leSlice (buf, start, end) {
var bytes = buf.slice(start, end);
var res = '';
for (var i = 0; i < bytes.length; i += 2) {
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
}
return res
}
Buffer.prototype.slice = function slice (start, end) {
var len = this.length;
start = ~~start;
end = end === undefined ? len : ~~end;
if (start < 0) {
start += len;
if (start < 0) start = 0;
} else if (start > len) {
start = len;
}
if (end < 0) {
end += len;
if (end < 0) end = 0;
} else if (end > len) {
end = len;
}
if (end < start) end = start;
var newBuf;
if (Buffer.TYPED_ARRAY_SUPPORT) {
newBuf = this.subarray(start, end);
newBuf.__proto__ = Buffer.prototype;
} else {
var sliceLen = end - start;
newBuf = new Buffer(sliceLen, undefined);
for (var i = 0; i < sliceLen; ++i) {
newBuf[i] = this[i + start];
}
}
return newBuf
};
/*
* Need to make sure that buffer isn't trying to write out of bounds.
*/
function checkOffset (offset, ext, length) {
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
}
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
offset = offset | 0;
byteLength = byteLength | 0;
if (!noAssert) checkOffset(offset, byteLength, this.length);
var val = this[offset];
var mul = 1;
var i = 0;
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul;
}
return val
};
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
offset = offset | 0;
byteLength = byteLength | 0;
if (!noAssert) {
checkOffset(offset, byteLength, this.length);
}
var val = this[offset + --byteLength];
var mul = 1;
while (byteLength > 0 && (mul *= 0x100)) {
val += this[offset + --byteLength] * mul;
}
return val
};
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length);
return this[offset]
};
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length);
return this[offset] | (this[offset + 1] << 8)
};
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length);
return (this[offset] << 8) | this[offset + 1]
};
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length);
return ((this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16)) +
(this[offset + 3] * 0x1000000)
};
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length);
return (this[offset] * 0x1000000) +
((this[offset + 1] << 16) |
(this[offset + 2] << 8) |
this[offset + 3])
};
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
offset = offset | 0;
byteLength = byteLength | 0;
if (!noAssert) checkOffset(offset, byteLength, this.length);
var val = this[offset];
var mul = 1;
var i = 0;
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul;
}
mul *= 0x80;
if (val >= mul) val -= Math.pow(2, 8 * byteLength);
return val
};
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
offset = offset | 0;
byteLength = byteLength | 0;
if (!noAssert) checkOffset(offset, byteLength, this.length);
var i = byteLength;
var mul = 1;
var val = this[offset + --i];
while (i > 0 && (mul *= 0x100)) {
val += this[offset + --i] * mul;
}
mul *= 0x80;
if (val >= mul) val -= Math.pow(2, 8 * byteLength);
return val
};
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length);
if (!(this[offset] & 0x80)) return (this[offset])
return ((0xff - this[offset] + 1) * -1)
};
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length);
var val = this[offset] | (this[offset + 1] << 8);
return (val & 0x8000) ? val | 0xFFFF0000 : val
};
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length);
var val = this[offset + 1] | (this[offset] << 8);
return (val & 0x8000) ? val | 0xFFFF0000 : val
};
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length);
return (this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16) |
(this[offset + 3] << 24)
};
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length);
return (this[offset] << 24) |
(this[offset + 1] << 16) |
(this[offset + 2] << 8) |
(this[offset + 3])
};
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length);
return read(this, offset, true, 23, 4)
};
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length);
return read(this, offset, false, 23, 4)
};
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length);
return read(this, offset, true, 52, 8)
};
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length);
return read(this, offset, false, 52, 8)
};
function checkInt (buf, value, offset, ext, max, min) {
if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
if (offset + ext > buf.length) throw new RangeError('Index out of range')
}
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
value = +value;
offset = offset | 0;
byteLength = byteLength | 0;
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1;
checkInt(this, value, offset, byteLength, maxBytes, 0);
}
var mul = 1;
var i = 0;
this[offset] = value & 0xFF;
while (++i < byteLength && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF;
}
return offset + byteLength
};
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
value = +value;
offset = offset | 0;
byteLength = byteLength | 0;
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1;
checkInt(this, value, offset, byteLength, maxBytes, 0);
}
var i = byteLength - 1;
var mul = 1;
this[offset + i] = value & 0xFF;
while (--i >= 0 && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF;
}
return offset + byteLength
};
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
this[offset] = (value & 0xff);
return offset + 1
};
function objectWriteUInt16 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffff + value + 1;
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
(littleEndian ? i : 1 - i) * 8;
}
}
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff);
this[offset + 1] = (value >>> 8);
} else {
objectWriteUInt16(this, value, offset, true);
}
return offset + 2
};
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8);
this[offset + 1] = (value & 0xff);
} else {
objectWriteUInt16(this, value, offset, false);
}
return offset + 2
};
function objectWriteUInt32 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffffffff + value + 1;
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff;
}
}
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset + 3] = (value >>> 24);
this[offset + 2] = (value >>> 16);
this[offset + 1] = (value >>> 8);
this[offset] = (value & 0xff);
} else {
objectWriteUInt32(this, value, offset, true);
}
return offset + 4
};
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24);
this[offset + 1] = (value >>> 16);
this[offset + 2] = (value >>> 8);
this[offset + 3] = (value & 0xff);
} else {
objectWriteUInt32(this, value, offset, false);
}
return offset + 4
};
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1);
checkInt(this, value, offset, byteLength, limit - 1, -limit);
}
var i = 0;
var mul = 1;
var sub = 0;
this[offset] = value & 0xFF;
while (++i < byteLength && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
sub = 1;
}
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;
}
return offset + byteLength
};
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1);
checkInt(this, value, offset, byteLength, limit - 1, -limit);
}
var i = byteLength - 1;
var mul = 1;
var sub = 0;
this[offset + i] = value & 0xFF;
while (--i >= 0 && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
sub = 1;
}
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;
}
return offset + byteLength
};
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);
if (value < 0) value = 0xff + value + 1;
this[offset] = (value & 0xff);
return offset + 1
};
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff);
this[offset + 1] = (value >>> 8);
} else {
objectWriteUInt16(this, value, offset, true);
}
return offset + 2
};
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8);
this[offset + 1] = (value & 0xff);
} else {
objectWriteUInt16(this, value, offset, false);
}
return offset + 2
};
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff);
this[offset + 1] = (value >>> 8);
this[offset + 2] = (value >>> 16);
this[offset + 3] = (value >>> 24);
} else {
objectWriteUInt32(this, value, offset, true);
}
return offset + 4
};
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
value = +value;
offset = offset | 0;
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
if (value < 0) value = 0xffffffff + value + 1;
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24);
this[offset + 1] = (value >>> 16);
this[offset + 2] = (value >>> 8);
this[offset + 3] = (value & 0xff);
} else {
objectWriteUInt32(this, value, offset, false);
}
return offset + 4
};
function checkIEEE754 (buf, value, offset, ext, max, min) {
if (offset + ext > buf.length) throw new RangeError('Index out of range')
if (offset < 0) throw new RangeError('Index out of range')
}
function writeFloat (buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 4);
}
write(buf, value, offset, littleEndian, 23, 4);
return offset + 4
}
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
return writeFloat(this, value, offset, true, noAssert)
};
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
return writeFloat(this, value, offset, false, noAssert)
};
function writeDouble (buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 8);
}
write(buf, value, offset, littleEndian, 52, 8);
return offset + 8
}
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
return writeDouble(this, value, offset, true, noAssert)
};
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
return writeDouble(this, value, offset, false, noAssert)
};
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
if (!start) start = 0;
if (!end && end !== 0) end = this.length;
if (targetStart >= target.length) targetStart = target.length;
if (!targetStart) targetStart = 0;
if (end > 0 && end < start) end = start;
// Copy 0 bytes; we're done
if (end === start) return 0
if (target.length === 0 || this.length === 0) return 0
// Fatal error conditions
if (targetStart < 0) {
throw new RangeError('targetStart out of bounds')
}
if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
if (end < 0) throw new RangeError('sourceEnd out of bounds')
// Are we oob?
if (end > this.length) end = this.length;
if (target.length - targetStart < end - start) {
end = target.length - targetStart + start;
}
var len = end - start;
var i;
if (this === target && start < targetStart && targetStart < end) {
// descending copy from end
for (i = len - 1; i >= 0; --i) {
target[i + targetStart] = this[i + start];
}
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
// ascending copy from start
for (i = 0; i < len; ++i) {
target[i + targetStart] = this[i + start];
}
} else {
Uint8Array.prototype.set.call(
target,
this.subarray(start, start + len),
targetStart
);
}
return len
};
// Usage:
// buffer.fill(number[, offset[, end]])
// buffer.fill(buffer[, offset[, end]])
// buffer.fill(string[, offset[, end]][, encoding])
Buffer.prototype.fill = function fill (val, start, end, encoding) {
// Handle string cases:
if (typeof val === 'string') {
if (typeof start === 'string') {
encoding = start;
start = 0;
end = this.length;
} else if (typeof end === 'string') {
encoding = end;
end = this.length;
}
if (val.length === 1) {
var code = val.charCodeAt(0);
if (code < 256) {
val = code;
}
}
if (encoding !== undefined && typeof encoding !== 'string') {
throw new TypeError('encoding must be a string')
}
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
throw new TypeError('Unknown encoding: ' + encoding)
}
} else if (typeof val === 'number') {
val = val & 255;
}
// Invalid ranges are not set to a default, so can range check early.
if (start < 0 || this.length < start || this.length < end) {
throw new RangeError('Out of range index')
}
if (end <= start) {
return this
}
start = start >>> 0;
end = end === undefined ? this.length : end >>> 0;
if (!val) val = 0;
var i;
if (typeof val === 'number') {
for (i = start; i < end; ++i) {
this[i] = val;
}
} else {
var bytes = internalIsBuffer(val)
? val
: utf8ToBytes(new Buffer(val, encoding).toString());
var len = bytes.length;
for (i = 0; i < end - start; ++i) {
this[i + start] = bytes[i % len];
}
}
return this
};
// HELPER FUNCTIONS
// ================
var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g;
function base64clean (str) {
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = stringtrim(str).replace(INVALID_BASE64_RE, '');
// Node converts strings with length < 2 to ''
if (str.length < 2) return ''
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
while (str.length % 4 !== 0) {
str = str + '=';
}
return str
}
function stringtrim (str) {
if (str.trim) return str.trim()
return str.replace(/^\s+|\s+$/g, '')
}
function toHex (n) {
if (n < 16) return '0' + n.toString(16)
return n.toString(16)
}
function utf8ToBytes (string, units) {
units = units || Infinity;
var codePoint;
var length = string.length;
var leadSurrogate = null;
var bytes = [];
for (var i = 0; i < length; ++i) {
codePoint = string.charCodeAt(i);
// is surrogate component
if (codePoint > 0xD7FF && codePoint < 0xE000) {
// last char was a lead
if (!leadSurrogate) {
// no lead yet
if (codePoint > 0xDBFF) {
// unexpected trail
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
continue
} else if (i + 1 === length) {
// unpaired lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
continue
}
// valid lead
leadSurrogate = codePoint;
continue
}
// 2 leads in a row
if (codePoint < 0xDC00) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
leadSurrogate = codePoint;
continue
}
// valid surrogate pair
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
} else if (leadSurrogate) {
// valid bmp char, but last char was a lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
}
leadSurrogate = null;
// encode utf8
if (codePoint < 0x80) {
if ((units -= 1) < 0) break
bytes.push(codePoint);
} else if (codePoint < 0x800) {
if ((units -= 2) < 0) break
bytes.push(
codePoint >> 0x6 | 0xC0,
codePoint & 0x3F | 0x80
);
} else if (codePoint < 0x10000) {
if ((units -= 3) < 0) break
bytes.push(
codePoint >> 0xC | 0xE0,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
);
} else if (codePoint < 0x110000) {
if ((units -= 4) < 0) break
bytes.push(
codePoint >> 0x12 | 0xF0,
codePoint >> 0xC & 0x3F | 0x80,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
);
} else {
throw new Error('Invalid code point')
}
}
return bytes
}
function asciiToBytes (str) {
var byteArray = [];
for (var i = 0; i < str.length; ++i) {
// Node's code seems to be doing this and not & 0x7F..
byteArray.push(str.charCodeAt(i) & 0xFF);
}
return byteArray
}
function utf16leToBytes (str, units) {
var c, hi, lo;
var byteArray = [];
for (var i = 0; i < str.length; ++i) {
if ((units -= 2) < 0) break
c = str.charCodeAt(i);
hi = c >> 8;
lo = c % 256;
byteArray.push(lo);
byteArray.push(hi);
}
return byteArray
}
function base64ToBytes (str) {
return toByteArray(base64clean(str))
}
function blitBuffer (src, dst, offset, length) {
for (var i = 0; i < length; ++i) {
if ((i + offset >= dst.length) || (i >= src.length)) break
dst[i + offset] = src[i];
}
return i
}
function isnan (val) {
return val !== val // eslint-disable-line no-self-compare
}
// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence
// The _isBuffer check is for Safari 5-7 support, because it's missing
// Object.prototype.constructor. Remove this eventually
function isBuffer(obj) {
return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))
}
function isFastBuffer (obj) {
return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
}
// For Node v0.10 support. Remove this eventually.
function isSlowBuffer (obj) {
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))
}
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function unwrapExports (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
function getCjsExportFromNamespace (n) {
return n && n['default'] || n;
}
var dist = createCommonjsModule(function (module, exports) {
(function (global, factory) {
factory(exports) ;
}(commonjsGlobal, (function (exports) {
class ValidateTypes {
constructor() {}
getType(value) {
return Object.prototype.toString.call(value);
}
getClassName(value) {
try {
return value.constructor.name;
} catch (e) {}
return this.getType(value);
} //Validation functions
isObject(value) {
if (this.getType(value) === "[object Object]") return true;
return false;
}
isFunction(value) {
if (this.getType(value) === "[object Function]") return true;
return false;
}
isString(value) {
if (this.getType(value) === "[object String]") return true;
return false;
}
isBoolean(value) {
if (this.getType(value) === "[object Boolean]") return true;
return false;
}
isArray(value) {
if (this.getType(value) === "[object Array]") return true;
return false;
}
isNumber(value) {
if (this.getType(value) === "[object Number]") return true;
return false;
}
isInteger(value) {
if (this.getType(value) === "[object Number]" && Number.isInteger(value)) return true;
return false;
}
isRegEx(value) {
if (this.getType(value) === "[object RegExp]") return true;
return false;
}
isStringHex(value) {
if (!this.isStringWithValue(value)) return false;
let hexRegEx = /([0-9]|[a-f])/gim;
return (value.match(hexRegEx) || []).length === value.length;
}
hasKeys(value, keys) {
if (keys.map(key => key in value).includes(false)) return false;
return true;
}
isStringWithValue(value) {
if (this.isString(value) && value !== '') return true;
return false;
}
isObjectWithKeys(value) {
if (this.isObject(value) && Object.keys(value).length > 0) return true;
return false;
}
isArrayWithValues(value) {
if (this.isArray(value) && value.length > 0) return true;
return false;
}
isSpecificClass(value, className) {
if (!this.isObject(value)) return false;
if (this.getClassName(value) !== className) return false;
return true;
}
}
class AssertTypes {
constructor() {
this.validate = new ValidateTypes();
} //Validation functions
isObject(value) {
if (!this.validate.isObject(value)) {
throw new TypeError(`Expected type [object Object] but got ${this.validate.getType(value)}`);
}
return true;
}
isFunction(value) {
if (!this.validate.isFunction(value)) {
throw new TypeError(`Expected type [object Function] but got ${this.validate.getType(value)}`);
}
return true;
}
isString(value) {
if (!this.validate.isString(value)) {
throw new TypeError(`Expected type [object String] but got ${this.validate.getType(value)}`);
}
return true;
}
isBoolean(value) {
if (!this.validate.isBoolean(value)) {
throw new TypeError(`Expected type [object Boolean] but got ${this.validate.getType(value)}`);
}
return true;
}
isArray(value) {
if (!this.validate.isArray(value)) {
throw new TypeError(`Expected type [object Array] but got ${this.validate.getType(value)}`);
}
return true;
}
isNumber(value) {
if (!this.validate.isNumber(value)) {
throw new TypeError(`Expected type [object Number] but got ${this.validate.getType(value)}`);
}
return true;
}
isInteger(value) {
if (!this.validate.isInteger(value)) {
throw new TypeError(`Expected "${value}" to be an integer but got non-integer value`);
}
return true;
}
isRegEx(value) {
if (!this.validate.isRegEx(value)) {
throw new TypeError(`Expected type [object RegExp] but got ${this.validate.getType(value)}`);
}
return true;
}
isStringHex(value) {
if (!this.validate.isStringHex(value)) {
throw new TypeError(`Expected "${value}" to be hex but got non-hex value`);
}
return true;
}
hasKeys(value, keys) {
if (!this.validate.hasKeys(value, keys)) {
throw new TypeError(`Provided object does not contain all keys ${JSON.stringify(keys)}`);
}
return true;
}
isStringWithValue(value) {
if (!this.validate.isStringWithValue(value)) {
throw new TypeError(`Expected "${value}" to be [object String] and not empty`);
}
return true;
}
isObjectWithKeys(value) {
if (!this.validate.isObjectWithKeys(value)) {
throw new TypeError(`Expected "${value}" to be [object Object] and have keys`);
}
return true;
}
isArrayWithValues(value) {
if (!this.validate.isArrayWithValues(value)) {
throw new TypeError(`Expected "${value}" to be [object Array] and not empty`);
}
return true;
}
isSpecificClass(value, className) {
if (!this.validate.isSpecificClass(value, className)) {
throw new TypeError(`Expected Object Class to be "${className}" but got ${this.validate.getClassName(value)}`);
}
return true;
}
}
const validateTypes = new ValidateTypes();
const assertTypes = new AssertTypes();
exports.assertTypes = assertTypes;
exports.validateTypes = validateTypes;
Object.defineProperty(exports, '__esModule', { value: true });
})));
});
var validators = unwrapExports(dist);
const nodeCryptoJs = require("node-cryptojs-aes");
const { CryptoJS, JsonFormatter } = nodeCryptoJs;
const validators$1 = require('types-validate-assert');
const { validateTypes, assertTypes } = validators$1;
/**
* Encrypt a Javascript object with a string password
* The object passed must pass JSON.stringify or the method will fail.
*
* @param {string} password A password to encrypt the object with
* @param {Object} obj A javascript object (must be JSON compatible)
* @return {string} Encrypted string
*/
function encryptObject ( password, obj ){
assertTypes.isStringWithValue(password);
assertTypes.isObject(obj);
const encrypted = CryptoJS.AES.encrypt(JSON.stringify(obj), password, { format: JsonFormatter }).toString();
return encrypted;
}
/**
* Decrypt an Object using a password string
*
* @param {string} password A password to encrypt the object with
* @param {string} objString A javascript object as JSON string
* @return {string} Encrypted string
*/
function decryptObject ( password, objString ) {
assertTypes.isStringWithValue(password);
assertTypes.isStringWithValue(objString);
try{
const decrypt = CryptoJS.AES.decrypt(objString, password, { format: JsonFormatter });
return JSON.parse(CryptoJS.enc.Utf8.stringify(decrypt));
} catch (e){
return false;
}
}
/**
* Encrypt a string using a password string
*
* @param {string} password A password to encrypt the object with
* @param {string} string A string to be password encrypted
* @return {string} Encrypted string
*/
function encryptStrHash( password, string ){
assertTypes.isStringWithValue(password);
assertTypes.isString(string);
const encrypt = CryptoJS.AES.encrypt(string, password).toString();
return encrypt;
}
/**
* Decrypt a string using a password string
*
* @param {string} password A password to encrypt the object with
* @param {string} encryptedString A string to decrypt
* @return {string} Decrypted string
*/
function decryptStrHash ( password, encryptedString ){
assertTypes.isStringWithValue(password);
assertTypes.isStringWithValue(encryptedString);
try{
const decrypted = CryptoJS.AES.decrypt(encryptedString, password);
return CryptoJS.enc.Utf8.stringify(decrypted) === '' ? false : CryptoJS.enc.Utf8.stringify(decrypted);
} catch (e) {
return false;
}
}
function buf2hex(buffer) {
return Array.prototype.map.call(new Uint8Array(buffer), x => ('00' + x.toString(16)).slice(-2)).join('');
}
function hex2buf(hexString) {
var bytes = new Uint8Array(Math.ceil(hexString.length / 2));
for (var i = 0; i < bytes.length; i++)
bytes[i] = parseInt(hexString.substr(i * 2, 2), 16);
return bytes;
}
function str2buf(string) {
var buf = new Buffer.from(string);
return new Uint8Array(buf);
}
function concatUint8Arrays(array1, array2) {
var arr = new Uint8Array(array1.length + array2.length);
arr.set(array1);
arr.set(array2, array1.length);
return arr;
}
function ab2str(buf) {
return String.fromCharCode.apply(null, new Uint8Array(buf));
}
function str2ab(str) {
var buf = new ArrayBuffer(str.length);
var bufView = new Uint8Array(buf);
for (var i = 0, strLen = str.length; i < strLen; i++) {
bufView[i] = str.charCodeAt(i);
}
return buf;
}
function str2hex(str) {
var hex = '';
for (var i = 0; i < str.length; i++) {
hex += '' + str.charCodeAt(i).toString(16);
}
return hex;
}
function hex2str(hexx) {
var hex = hexx.toString(); //force conversion
var str = '';
for (var i = 0; (i < hex.length && hex.substr(i, 2) !== '00'); i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
return str;
}
function randomString(length) {
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < length; i++) {
text += possible.charAt(Math.floor(Math.random() * possible.length));
}
return text;
}
function isStringHex(string = '') {
let hexRegEx = /([0-9]|[a-f])/gim;
return typeof string === 'string' &&
(string.match(hexRegEx) || []).length === string.length;
}
function isLamdenKey( string ){
if (validateTypes.isStringHex(string) && string.length === 64) return true;
return false;
}
var utils = /*#__PURE__*/Object.freeze({
__proto__: null,
encryptObject: encryptObject,
decryptObject: decryptObject,
encryptStrHash: encryptStrHash,
decryptStrHash: decryptStrHash,
buf2hex: buf2hex,
hex2buf: hex2buf,
str2buf: str2buf,
concatUint8Arrays: concatUint8Arrays,
ab2str: ab2str,
str2ab: str2ab,
str2hex: str2hex,
hex2str: hex2str,
randomString: randomString,
isStringHex: isStringHex,
isLamdenKey: isLamdenKey
});
const nacl = require('tweetnacl');
const bip39 = require('bip39');
const bip32 = require('ed25519-hd-key');
/**
* Create a wallet object for signing and verifying messages
*
* @param {Object} [args={}] Args Object
* @param {string} [args.sk=undefined] A 32 character long hex representation of a signing key (private key) to create wallet from
* @param {Uint8Array(length: 32)} [args.seed=null] A Uint8Array with a length of 32 to seed the keyPair with. This is advanced behavior and should be avoided by everyday users
* @param {boolean} [args.keepPrivate=false] No direct access to the sk. Will still allow the wallet to sign messages
* @return {Object} Wallet Object with sign and verify methods
*/
let create_wallet = (args = {}) => {
let { sk = undefined, keepPrivate = false, seed = null } = args;
let vk;
if (sk) {
vk = get_vk(sk);
}else{
let keyPair = new_wallet(seed);
vk = keyPair.vk;
sk = keyPair.sk;
}
const wallet = () => {
return {
sign: (msg) => sign(sk, msg),
verify: (msg, sig) => verify(vk, msg, sig),
vk,
sk: !keepPrivate ? sk : undefined
}
};
return wallet()
};
/**
* @param Uint8Array(length: 32) seed
* seed: A Uint8Array with a length of 32 to seed the keyPair with. This is advanced behavior and should be
* avoided by everyday users
*
* @return {Uint8Array(length: 32), Uint8Array(length: 32)} { vk, sk }
* sk: Signing Key (SK) represents 32 byte signing key
* vk: Verify Key (VK) represents a 32 byte verify key
*/
function generate_keys(seed = null) {
var kp = null;
if (seed == null) {
kp = nacl.sign.keyPair();
}
else {
kp = nacl.sign.keyPair.fromSeed(seed);
}
// In the JS implementation of the NaCL library the sk is the first 32 bytes of the secretKey
// and the vk is the last 32 bytes of the secretKey as well as the publicKey
// {
// 'publicKey': <vk>,
// 'secretKey': <sk><vk>
// }
return {
sk: new Uint8Array(kp['secretKey'].slice(0, 32)),
vk: new Uint8Array(kp['secretKey'].slice(32, 64))
};
}
/**
* @param String sk
* sk: A 64 character long hex representation of a signing key (private key)
*
* @return String vk
* vk: A 64 character long hex representation of a verify key (public key)
*/
function get_vk(sk) {
var kp = format_to_keys(sk);
var kpf = keys_to_format(kp);
return kpf.vk;
}
/**
* @param String sk
* sk: A 64 character long hex representation of a signing key (private key)
*
* @return {Uint8Array(length: 32), Uint8Array(length: 32)} { vk, sk }
* sk: Signing Key (SK) represents 32 byte signing key
* vk: Verify Key (VK) represents a 32 byte verify key
*/
function format_to_keys(sk) {
var skf = hex2buf(sk);
var kp = generate_keys(skf);
return kp;
}
/**
* @param Object kp
* kp: Object containing the properties sk and vk
* sk: Signing Key (SK) represents 32 byte signing key
* vk: Verify Key (VK) represents a 32 byte verify key
*
* @return {string, string} { sk, vk }
* sk: Signing Key (SK) represented as a 64 character hex string
* vk: Verify Key (VK) represented as a 64 character hex string
*/
function keys_to_format(kp) {
return {
vk: buf2hex(kp.vk),
sk: buf2hex(kp.sk)
};
}
/**
* @param Uint8Array(length: 32) seed
* seed: A Uint8Array with a length of 32 to seed the keyPair with. This is advanced behavior and should be
* avoided by everyday users
*
* @return {string, string} { sk, vk }
* sk: Signing Key (SK) represented as a 64 character hex string
* vk: Verify Key (VK) represented as a 64 character hex string
*/
function new_wallet(seed = null) {
const keys = generate_keys(seed);
return keys_to_format(keys);
}
/**
*
* @param mnemonic 24 word seed phrase
* @param derivationIndex bip32 derivation key index
* @returns {{derivationIndex: number, vk: string, sk: string, mnemonic: string}}
* derivationIndex: bip32 derivation key index
* vk: Verify Key (VK) represented as a 64 character hex string
* sk: Signing Key (SK) represented as a 64 character hex string
* mnemonic: 24 word seed phrase
*/
function generate_keys_bip39(mnemonic = undefined, derivationIndex = 0) {
let finalMnemonic;
if (mnemonic !== undefined){
finalMnemonic = mnemonic;
}else {
finalMnemonic = bip39.generateMnemonic(256);
}
const seed = bip39.mnemonicToSeedSync(finalMnemonic).toString('hex');
const derivationPath = "m/44'/789'/" + derivationIndex + "'/0'/0'";
const { key, chainCode } = bip32.derivePath(derivationPath, seed, 0x80000000);
const privateKey = key.toString('hex');
const publicKey = bip32.getPublicKey(key, false).toString('hex');
if (publicKey !== get_vk(privateKey)){
throw Error('Bip32 public key does not match with Lamden public key!')
}
return {
sk: privateKey,
vk: publicKey,
derivationIndex: derivationIndex,
mnemonic: finalMnemonic
}
}
/**
* @param mnemonic 24 word seed phrase
* @param derivationIndex bip32 derivation key index
*
* @return {{derivationIndex: number, vk: string, sk: string, mnemonic: (string|undefined)}} { sk, vk, derivationIndex, mnemonic }
* sk: Signing Key (SK) represented as a 64 character hex string
* vk: Verify Key (VK) represented as a 64 character hex string
* derivationIndex: Bip32 derivation index
* mnemonic: 24 word seed phrase
*/
function new_wallet_bip39(mnemonic = undefined, derivationIndex = 0) {
return generate_keys_bip39(mnemonic, derivationIndex);
}
/**
* @param String sk
* @param Uint8Array msg
* sk: A 64 character long hex representation of a signing key (private key)
* msg: A Uint8Array of bytes representing the message you would like to sign
*
* @return String sig
* sig: A 128 character long hex string representing the message's signature
*/
function sign(sk, msg) {
var kp = format_to_keys(sk);
// This is required due to the secretKey required to sign a transaction
// in the js implementation of NaCL being the combination of the sk and
// vk for some stupid reason. That being said, we still want the sk and
// vk objects to exist in 32-byte string format (same as cilantro's
// python implementation) when presented to the user.
var jsnacl_sk = concatUint8Arrays(kp.sk, kp.vk);
return buf2hex(nacl.sign.detached(msg, jsnacl_sk));
}
/**
* @param String vk
* @param Uint8Array msg
* @param String sig
* vk: A 64 character long hex representation of a verify key (public key)
* msg: A Uint8Array (bytes) representation of a message that has been signed
* sig: A 128 character long hex representation of a nacl signature
*
* @return Bool result
* result: true if verify checked out, false if not
*/
function verify(vk, msg, sig) {
var vkb = hex2buf(vk);
var sigb = hex2buf(sig);
try {
return nacl.sign.detached.verify(msg, sigb, vkb);
}
catch (_a) {
return false;
}
}
var wallet = /*#__PURE__*/Object.freeze({
__proto__: null,
create_wallet: create_wallet,
generate_keys: generate_keys,
get_vk: get_vk,
format_to_keys: format_to_keys,
keys_to_format: keys_to_format,
new_wallet: new_wallet,
new_wallet_bip39: new_wallet_bip39,
sign: sign,
verify: verify
});
class EventEmitter {
constructor() {
this._events = {};
}
on(name, listener) {
if (!this._events[name]) {
this._events[name] = [];
}
this._events[name].push(listener);
}
removeListener(name, listenerToRemove) {
if (!this._events[name]) {
throw new Error(`Can't remove a listener. Event "${name}" doesn't exits.`);
}
const filterListeners = (listener) => listener !== listenerToRemove;
this._events[name] = this._events[name].filter(filterListeners);
}
emit(name, data) {
if (!this._events[name]) return
const fireCallbacks = (callback) => {
callback(data);
};
this._events[name].forEach(fireCallbacks);
}
}
/*
* bignumber.js v9.0.0
* A JavaScript library for arbitrary-precision arithmetic.
* https://github.com/MikeMcl/bignumber.js
* Copyright (c) 2019 Michael Mclaughlin <M8ch88l@gmail.com>
* MIT Licensed.
*
* BigNumber.prototype methods | BigNumber methods
* |
* absoluteValue abs | clone
* comparedTo | config set
* decimalPlaces dp | DECIMAL_PLACES
* dividedBy div | ROUNDING_MODE
* dividedToIntegerBy idiv | EXPONENTIAL_AT
* exponentiatedBy pow | RANGE
* integerValue | CRYPTO
* isEqualTo eq | MODULO_MODE
* isFinite | POW_PRECISION
* isGreaterThan gt | FORMAT
* isGreaterThanOrEqualTo gte | ALPHABET
* isInteger | isBigNumber
* isLessThan lt | maximum max
* isLessThanOrEqualTo lte | minimum min
* isNaN | random
* isNegative | sum
* isPositive |
* isZero |
* minus |
* modulo mod |
* multipliedBy times |
* negated |
* plus |
* precision sd |
* shiftedBy |
* squareRoot sqrt |
* toExponential |
* toFixed |
* toFormat |
* toFraction |
* toJSON |
* toNumber |
* toPrecision |
* toString |
* valueOf |
*
*/
var
isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,
mathceil = Math.ceil,
mathfloor = Math.floor,
bignumberError = '[BigNumber Error] ',
tooManyDigits = bignumberError + 'Number primitive has more than 15 significant digits: ',
BASE = 1e14,
LOG_BASE = 14,
MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1
// MAX_INT32 = 0x7fffffff, // 2^31 - 1
POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],
SQRT_BASE = 1e7,
// EDITABLE
// The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and
// the arguments to toExponential, toFixed, toFormat, and toPrecision.
MAX = 1E9; // 0 to MAX_INT32
/*
* Create and return a BigNumber constructor.
*/
function clone(configObject) {
var div, convertBase, parseNumeric,
P = BigNumber.prototype = { constructor: BigNumber, toString: null, valueOf: null },
ONE = new BigNumber(1),
//----------------------------- EDITABLE CONFIG DEFAULTS -------------------------------
// The default values below must be integers within the inclusive ranges stated.
// The values can also be changed at run-time using BigNumber.set.
// The maximum number of decimal places for operations involving division.
DECIMAL_PLACES = 20, // 0 to MAX
// The rounding mode used when rounding to the above decimal places, and when using
// toExponential, toFixed, toFormat and toPrecision, and round (default value).
// UP 0 Away from zero.
// DOWN 1 Towards zero.
// CEIL 2 Towards +Infinity.
// FLOOR 3 Towards -Infinity.
// HALF_UP 4 Towards nearest neighbour. If equidistant, up.
// HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.
// HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.
// HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.
// HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.
ROUNDING_MODE = 4, // 0 to 8
// EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]
// The exponent value at and beneath which toString returns exponential notation.
// Number type: -7
TO_EXP_NEG = -7, // 0 to -MAX
// The exponent value at and above which toString returns exponential notation.
// Number type: 21
TO_EXP_POS = 21, // 0 to MAX
// RANGE : [MIN_EXP, MAX_EXP]
// The minimum exponent value, beneath which underflow to zero occurs.
// Number type: -324 (5e-324)
MIN_EXP = -1e7, // -1 to -MAX
// The maximum exponent value, above which overflow to Infinity occurs.
// Number type: 308 (1.7976931348623157e+308)
// For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.
MAX_EXP = 1e7, // 1 to MAX
// Whether to use cryptographically-secure random number generation, if available.
CRYPTO = false, // true or false
// The modulo mode used when calculating the modulus: a mod n.
// The quotient (q = a / n) is calculated according to the corresponding rounding mode.
// The remainder (r) is calculated as: r = a - n * q.
//
// UP 0 The remainder is positive if the dividend is negative, else is negative.
// DOWN 1 The remainder has the same sign as the dividend.
// This modulo mode is commonly known as 'truncated division' and is
// equivalent to (a % n) in JavaScript.
// FLOOR 3 The remainder has the same sign as the divisor (Python %).
// HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.
// EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).
// The remainder is always positive.
//
// The truncated division, floored division, Euclidian division and IEEE 754 remainder
// modes are commonly used for the modulus operation.
// Although the other rounding modes can also be used, they may not give useful results.
MODULO_MODE = 1, // 0 to 9
// The maximum number of significant digits of the result of the exponentiatedBy operation.
// If POW_PRECISION is 0, there will be unlimited significant digits.
POW_PRECISION = 0, // 0 to MAX
// The format specification used by the BigNumber.prototype.toFormat method.
FORMAT = {
prefix: '',
groupSize: 3,
secondaryGroupSize: 0,
groupSeparator: ',',
decimalSeparator: '.',
fractionGroupSize: 0,
fractionGroupSeparator: '\xA0', // non-breaking space
suffix: ''
},
// The alphabet used for base conversion. It must be at least 2 characters long, with no '+',
// '-', '.', whitespace, or repeated character.
// '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_'
ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz';
//------------------------------------------------------------------------------------------
// CONSTRUCTOR
/*
* The BigNumber constructor and exported function.
* Create and return a new instance of a BigNumber object.
*
* v {number|string|BigNumber} A numeric value.
* [b] {number} The base of v. Integer, 2 to ALPHABET.length inclusive.
*/
function BigNumber(v, b) {
var alphabet, c, caseChanged, e, i, isNum, len, str,
x = this;
// Enable constructor call without `new`.
if (!(x instanceof BigNumber)) return new BigNumber(v, b);
if (b == null) {
if (v && v._isBigNumber === true) {
x.s = v.s;
if (!v.c || v.e > MAX_EXP) {
x.c = x.e = null;
} else if (v.e < MIN_EXP) {
x.c = [x.e = 0];
} else {
x.e = v.e;
x.c = v.c.slice();
}
return;
}
if ((isNum = typeof v == 'number') && v * 0 == 0) {
// Use `1 / n` to handle minus zero also.
x.s = 1 / v < 0 ? (v = -v, -1) : 1;
// Fast path for integers, where n < 2147483648 (2**31).
if (v === ~~v) {
for (e = 0, i = v; i >= 10; i /= 10, e++);
if (e > MAX_EXP) {
x.c = x.e = null;
} else {
x.e = e;
x.c = [v];
}
return;
}
str = String(v);
} else {
if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);
x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;
}
// Decimal point?
if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');
// Exponential form?
if ((i = str.search(/e/i)) > 0) {
// Determine exponent.
if (e < 0) e = i;
e += +str.slice(i + 1);
str = str.substring(0, i);
} else if (e < 0) {
// Integer.
e = str.length;
}
} else {
// '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'
intCheck(b, 2, ALPHABET.length, 'Base');
// Allow exponential notation to be used with base 10 argument, while
// also rounding to DECIMAL_PLACES as with other bases.
if (b == 10) {
x = new BigNumber(v);
return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);
}
str = String(v);
if (isNum = typeof v == 'number') {
// Avoid potential interpretation of Infinity and NaN as base 44+ values.
if (v * 0 != 0) return parseNumeric(x, str, isNum, b);
x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;
// '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'
if (BigNumber.DEBUG && str.replace(/^0\.0*|\./, '').length > 15) {
throw Error
(tooManyDigits + v);
}
} else {
x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
}
alphabet = ALPHABET.slice(0, b);
e = i = 0;
// Check that str is a valid base b number.
// Don't use RegExp, so alphabet can contain special characters.
for (len = str.length; i < len; i++) {
if (alphabet.indexOf(c = str.charAt(i)) < 0) {
if (c == '.') {
// If '.' is not the first character and it has not be found before.
if (i > e) {
e = len;
continue;
}
} else if (!caseChanged) {
// Allow e.g. hexadecimal 'FF' as well as 'ff'.
if (str == str.toUpperCase() && (str = str.toLowerCase()) ||
str == str.toLowerCase() && (str = str.toUpperCase())) {
caseChanged = true;
i = -1;
e = 0;
continue;
}
}
return parseNumeric(x, String(v), isNum, b);
}
}
// Prevent later check for length on converted number.
isNum = false;
str = convertBase(str, b, 10, x.s);
// Decimal point?
if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');
else e = str.length;
}
// Determine leading zeros.
for (i = 0; str.charCodeAt(i) === 48; i++);
// Determine trailing zeros.
for (len = str.length; str.charCodeAt(--len) === 48;);
if (str = str.slice(i, ++len)) {
len -= i;
// '[BigNumber Error] Number primitive has more than 15 significant digits: {n}'
if (isNum && BigNumber.DEBUG &&
len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {
throw Error
(tooManyDigits + (x.s * v));
}
// Overflow?
if ((e = e - i - 1) > MAX_EXP) {
// Infinity.
x.c = x.e = null;
// Underflow?
} else if (e < MIN_EXP) {
// Zero.
x.c = [x.e = 0];
} else {
x.e = e;
x.c = [];
// Transform base
// e is the base 10 exponent.
// i is where to slice str to get the first element of the coefficient array.
i = (e + 1) % LOG_BASE;
if (e < 0) i += LOG_BASE; // i < 1
if (i < len) {
if (i) x.c.push(+str.slice(0, i));
for (len -= LOG_BASE; i < len;) {
x.c.push(+str.slice(i, i += LOG_BASE));
}
i = LOG_BASE - (str = str.slice(i)).length;
} else {
i -= len;
}
for (; i--; str += '0');
x.c.push(+str);
}
} else {
// Zero.
x.c = [x.e = 0];
}
}
// CONSTRUCTOR PROPERTIES
BigNumber.clone = clone;
BigNumber.ROUND_UP = 0;
BigNumber.ROUND_DOWN = 1;
BigNumber.ROUND_CEIL = 2;
BigNumber.ROUND_FLOOR = 3;
BigNumber.ROUND_HALF_UP = 4;
BigNumber.ROUND_HALF_DOWN = 5;
BigNumber.ROUND_HALF_EVEN = 6;
BigNumber.ROUND_HALF_CEIL = 7;
BigNumber.ROUND_HALF_FLOOR = 8;
BigNumber.EUCLID = 9;
/*
* Configure infrequently-changing library-wide settings.
*
* Accept an object with the following optional properties (if the value of a property is
* a number, it must be an integer within the inclusive range stated):
*
* DECIMAL_PLACES {number} 0 to MAX
* ROUNDING_MODE {number} 0 to 8
* EXPONENTIAL_AT {number|number[]} -MAX to MAX or [-MAX to 0, 0 to MAX]
* RANGE {number|number[]} -MAX to MAX (not zero) or [-MAX to -1, 1 to MAX]
* CRYPTO {boolean} true or false
* MODULO_MODE {number} 0 to 9
* POW_PRECISION {number} 0 to MAX
* ALPHABET {string} A string of two or more unique characters which does
* not contain '.'.
* FORMAT {object} An object with some of the following properties:
* prefix {string}
* groupSize {number}
* secondaryGroupSize {number}
* groupSeparator {string}
* decimalSeparator {string}
* fractionGroupSize {number}
* fractionGroupSeparator {string}
* suffix {string}
*
* (The values assigned to the above FORMAT object properties are not checked for validity.)
*
* E.g.
* BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })
*
* Ignore properties/parameters set to null or undefined, except for ALPHABET.
*
* Return an object with the properties current values.
*/
BigNumber.config = BigNumber.set = function (obj) {
var p, v;
if (obj != null) {
if (typeof obj == 'object') {
// DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.
// '[BigNumber Error] DECIMAL_PLACES {not a primitive number|not an integer|out of range}: {v}'
if (obj.hasOwnProperty(p = 'DECIMAL_PLACES')) {
v = obj[p];
intCheck(v, 0, MAX, p);
DECIMAL_PLACES = v;
}
// ROUNDING_MODE {number} Integer, 0 to 8 inclusive.
// '[BigNumber Error] ROUNDING_MODE {not a primitive number|not an integer|out of range}: {v}'
if (obj.hasOwnProperty(p = 'ROUNDING_MODE')) {
v = obj[p];
intCheck(v, 0, 8, p);
ROUNDING_MODE = v;
}
// EXPONENTIAL_AT {number|number[]}
// Integer, -MAX to MAX inclusive or
// [integer -MAX to 0 inclusive, 0 to MAX inclusive].
// '[BigNumber Error] EXPONENTIAL_AT {not a primitive number|not an integer|out of range}: {v}'
if (obj.hasOwnProperty(p = 'EXPONENTIAL_AT')) {
v = obj[p];
if (v && v.pop) {
intCheck(v[0], -MAX, 0, p);
intCheck(v[1], 0, MAX, p);
TO_EXP_NEG = v[0];
TO_EXP_POS = v[1];
} else {
intCheck(v, -MAX, MAX, p);
TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);
}
}
// RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or
// [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].
// '[BigNumber Error] RANGE {not a primitive number|not an integer|out of range|cannot be zero}: {v}'
if (obj.hasOwnProperty(p = 'RANGE')) {
v = obj[p];
if (v && v.pop) {
intCheck(v[0], -MAX, -1, p);
intCheck(v[1], 1, MAX, p);
MIN_EXP = v[0];
MAX_EXP = v[1];
} else {
intCheck(v, -MAX, MAX, p);
if (v) {
MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);
} else {
throw Error
(bignumberError + p + ' cannot be zero: ' + v);
}
}
}
// CRYPTO {boolean} true or false.
// '[BigNumber Error] CRYPTO not true or false: {v}'
// '[BigNumber Error] crypto unavailable'
if (obj.hasOwnProperty(p = 'CRYPTO')) {
v = obj[p];
if (v === !!v) {
if (v) {
if (typeof crypto != 'undefined' && crypto &&
(crypto.getRandomValues || crypto.randomBytes)) {
CRYPTO = v;
} else {
CRYPTO = !v;
throw Error
(bignumberError + 'crypto unavailable');
}
} else {
CRYPTO = v;
}
} else {
throw Error
(bignumberError + p + ' not true or false: ' + v);
}
}
// MODULO_MODE {number} Integer, 0 to 9 inclusive.
// '[BigNumber Error] MODULO_MODE {not a primitive number|not an integer|out of range}: {v}'
if (obj.hasOwnProperty(p = 'MODULO_MODE')) {
v = obj[p];
intCheck(v, 0, 9, p);
MODULO_MODE = v;
}
// POW_PRECISION {number} Integer, 0 to MAX inclusive.
// '[BigNumber Error] POW_PRECISION {not a primitive number|not an integer|out of range}: {v}'
if (obj.hasOwnProperty(p = 'POW_PRECISION')) {
v = obj[p];
intCheck(v, 0, MAX, p);
POW_PRECISION = v;
}
// FORMAT {object}
// '[BigNumber Error] FORMAT not an object: {v}'
if (obj.hasOwnProperty(p = 'FORMAT')) {
v = obj[p];
if (typeof v == 'object') FORMAT = v;
else throw Error
(bignumberError + p + ' not an object: ' + v);
}
// ALPHABET {string}
// '[BigNumber Error] ALPHABET invalid: {v}'
if (obj.hasOwnProperty(p = 'ALPHABET')) {
v = obj[p];
// Disallow if only one character,
// or if it contains '+', '-', '.', whitespace, or a repeated character.
if (typeof v == 'string' && !/^.$|[+-.\s]|(.).*\1/.test(v)) {
ALPHABET = v;
} else {
throw Error
(bignumberError + p + ' invalid: ' + v);
}
}
} else {
// '[BigNumber Error] Object expected: {v}'
throw Error
(bignumberError + 'Object expected: ' + obj);
}
}
return {
DECIMAL_PLACES: DECIMAL_PLACES,
ROUNDING_MODE: ROUNDING_MODE,
EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],
RANGE: [MIN_EXP, MAX_EXP],
CRYPTO: CRYPTO,
MODULO_MODE: MODULO_MODE,
POW_PRECISION: POW_PRECISION,
FORMAT: FORMAT,
ALPHABET: ALPHABET
};
};
/*
* Return true if v is a BigNumber instance, otherwise return false.
*
* If BigNumber.DEBUG is true, throw if a BigNumber instance is not well-formed.
*
* v {any}
*
* '[BigNumber Error] Invalid BigNumber: {v}'
*/
BigNumber.isBigNumber = function (v) {
if (!v || v._isBigNumber !== true) return false;
if (!BigNumber.DEBUG) return true;
var i, n,
c = v.c,
e = v.e,
s = v.s;
out: if ({}.toString.call(c) == '[object Array]') {
if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {
// If the first element is zero, the BigNumber value must be zero.
if (c[0] === 0) {
if (e === 0 && c.length === 1) return true;
break out;
}
// Calculate number of digits that c[0] should have, based on the exponent.
i = (e + 1) % LOG_BASE;
if (i < 1) i += LOG_BASE;
// Calculate number of digits of c[0].
//if (Math.ceil(Math.log(c[0] + 1) / Math.LN10) == i) {
if (String(c[0]).length == i) {
for (i = 0; i < c.length; i++) {
n = c[i];
if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;
}
// Last element cannot be zero, unless it is the only element.
if (n !== 0) return true;
}
}
// Infinity/NaN
} else if (c === null && e === null && (s === null || s === 1 || s === -1)) {
return true;
}
throw Error
(bignumberError + 'Invalid BigNumber: ' + v);
};
/*
* Return a new BigNumber whose value is the maximum of the arguments.
*
* arguments {number|string|BigNumber}
*/
BigNumber.maximum = BigNumber.max = function () {
return maxOrMin(arguments, P.lt);
};
/*
* Return a new BigNumber whose value is the minimum of the arguments.
*
* arguments {number|string|BigNumber}
*/
BigNumber.minimum = BigNumber.min = function () {
return maxOrMin(arguments, P.gt);
};
/*
* Return a new BigNumber with a random value equal to or greater than 0 and less than 1,
* and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing
* zeros are produced).
*
* [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
*
* '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp}'
* '[BigNumber Error] crypto unavailable'
*/
BigNumber.random = (function () {
var pow2_53 = 0x20000000000000;
// Return a 53 bit integer n, where 0 <= n < 9007199254740992.
// Check if Math.random() produces more than 32 bits of randomness.
// If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.
// 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.
var random53bitInt = (Math.random() * pow2_53) & 0x1fffff
? function () { return mathfloor(Math.random() * pow2_53); }
: function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +
(Math.random() * 0x800000 | 0); };
return function (dp) {
var a, b, e, k, v,
i = 0,
c = [],
rand = new BigNumber(ONE);
if (dp == null) dp = DECIMAL_PLACES;
else intCheck(dp, 0, MAX);
k = mathceil(dp / LOG_BASE);
if (CRYPTO) {
// Browsers supporting crypto.getRandomValues.
if (crypto.getRandomValues) {
a = crypto.getRandomValues(new Uint32Array(k *= 2));
for (; i < k;) {
// 53 bits:
// ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)
// 11111 11111111 11111111 11111111 11100000 00000000 00000000
// ((Math.pow(2, 32) - 1) >>> 11).toString(2)
// 11111 11111111 11111111
// 0x20000 is 2^21.
v = a[i] * 0x20000 + (a[i + 1] >>> 11);
// Rejection sampling:
// 0 <= v < 9007199254740992
// Probability that v >= 9e15, is
// 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251
if (v >= 9e15) {
b = crypto.getRandomValues(new Uint32Array(2));
a[i] = b[0];
a[i + 1] = b[1];
} else {
// 0 <= v <= 8999999999999999
// 0 <= (v % 1e14) <= 99999999999999
c.push(v % 1e14);
i += 2;
}
}
i = k / 2;
// Node.js supporting crypto.randomBytes.
} else if (crypto.randomBytes) {
// buffer
a = crypto.randomBytes(k *= 7);
for (; i < k;) {
// 0x1000000000000 is 2^48, 0x10000000000 is 2^40
// 0x100000000 is 2^32, 0x1000000 is 2^24
// 11111 11111111 11111111 11111111 11111111 11111111 11111111
// 0 <= v < 9007199254740992
v = ((a[i] & 31) * 0x1000000000000) + (a[i + 1] * 0x10000000000) +
(a[i + 2] * 0x100000000) + (a[i + 3] * 0x1000000) +
(a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];
if (v >= 9e15) {
crypto.randomBytes(7).copy(a, i);
} else {
// 0 <= (v % 1e14) <= 99999999999999
c.push(v % 1e14);
i += 7;
}
}
i = k / 7;
} else {
CRYPTO = false;
throw Error
(bignumberError + 'crypto unavailable');
}
}
// Use Math.random.
if (!CRYPTO) {
for (; i < k;) {
v = random53bitInt();
if (v < 9e15) c[i++] = v % 1e14;
}
}
k = c[--i];
dp %= LOG_BASE;
// Convert trailing digits to zeros according to dp.
if (k && dp) {
v = POWS_TEN[LOG_BASE - dp];
c[i] = mathfloor(k / v) * v;
}
// Remove trailing elements which are zero.
for (; c[i] === 0; c.pop(), i--);
// Zero?
if (i < 0) {
c = [e = 0];
} else {
// Remove leading elements which are zero and adjust exponent accordingly.
for (e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);
// Count the digits of the first element of c to determine leading zeros, and...
for (i = 1, v = c[0]; v >= 10; v /= 10, i++);
// adjust the exponent accordingly.
if (i < LOG_BASE) e -= LOG_BASE - i;
}
rand.e = e;
rand.c = c;
return rand;
};
})();
/*
* Return a BigNumber whose value is the sum of the arguments.
*
* arguments {number|string|BigNumber}
*/
BigNumber.sum = function () {
var i = 1,
args = arguments,
sum = new BigNumber(args[0]);
for (; i < args.length;) sum = sum.plus(args[i++]);
return sum;
};
// PRIVATE FUNCTIONS
// Called by BigNumber and BigNumber.prototype.toString.
convertBase = (function () {
var decimal = '0123456789';
/*
* Convert string of baseIn to an array of numbers of baseOut.
* Eg. toBaseOut('255', 10, 16) returns [15, 15].
* Eg. toBaseOut('ff', 16, 10) returns [2, 5, 5].
*/
function toBaseOut(str, baseIn, baseOut, alphabet) {
var j,
arr = [0],
arrL,
i = 0,
len = str.length;
for (; i < len;) {
for (arrL = arr.length; arrL--; arr[arrL] *= baseIn);
arr[0] += alphabet.indexOf(str.charAt(i++));
for (j = 0; j < arr.length; j++) {
if (arr[j] > baseOut - 1) {
if (arr[j + 1] == null) arr[j + 1] = 0;
arr[j + 1] += arr[j] / baseOut | 0;
arr[j] %= baseOut;
}
}
}
return arr.reverse();
}
// Convert a numeric string of baseIn to a numeric string of baseOut.
// If the caller is toString, we are converting from base 10 to baseOut.
// If the caller is BigNumber, we are converting from baseIn to base 10.
return function (str, baseIn, baseOut, sign, callerIsToString) {
var alphabet, d, e, k, r, x, xc, y,
i = str.indexOf('.'),
dp = DECIMAL_PLACES,
rm = ROUNDING_MODE;
// Non-integer.
if (i >= 0) {
k = POW_PRECISION;
// Unlimited precision.
POW_PRECISION = 0;
str = str.replace('.', '');
y = new BigNumber(baseIn);
x = y.pow(str.length - i);
POW_PRECISION = k;
// Convert str as if an integer, then restore the fraction part by dividing the
// result by its base raised to a power.
y.c = toBaseOut(toFixedPoint(coeffToString(x.c), x.e, '0'),
10, baseOut, decimal);
y.e = y.c.length;
}
// Convert the number as integer.
xc = toBaseOut(str, baseIn, baseOut, callerIsToString
? (alphabet = ALPHABET, decimal)
: (alphabet = decimal, ALPHABET));
// xc now represents str as an integer and converted to baseOut. e is the exponent.
e = k = xc.length;
// Remove trailing zeros.
for (; xc[--k] == 0; xc.pop());
// Zero?
if (!xc[0]) return alphabet.charAt(0);
// Does str represent an integer? If so, no need for the division.
if (i < 0) {
--e;
} else {
x.c = xc;
x.e = e;
// The sign is needed for correct rounding.
x.s = sign;
x = div(x, y, dp, rm, baseOut);
xc = x.c;
r = x.r;
e = x.e;
}
// xc now represents str converted to baseOut.
// THe index of the rounding digit.
d = e + dp + 1;
// The rounding digit: the digit to the right of the digit that may be rounded up.
i = xc[d];
// Look at the rounding digits and mode to determine whether to round up.
k = baseOut / 2;
r = r || d < 0 || xc[d + 1] != null;
r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))
: i > k || i == k &&(rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||
rm == (x.s < 0 ? 8 : 7));
// If the index of the rounding digit is not greater than zero, or xc represents
// zero, then the result of the base conversion is zero or, if rounding up, a value
// such as 0.00001.
if (d < 1 || !xc[0]) {
// 1^-dp or 0
str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);
} else {
// Truncate xc to the required number of decimal places.
xc.length = d;
// Round up?
if (r) {
// Rounding up may mean the previous digit has to be rounded up and so on.
for (--baseOut; ++xc[--d] > baseOut;) {
xc[d] = 0;
if (!d) {
++e;
xc = [1].concat(xc);
}
}
}
// Determine trailing zeros.
for (k = xc.length; !xc[--k];);
// E.g. [4, 11, 15] becomes 4bf.
for (i = 0, str = ''; i <= k; str += alphabet.charAt(xc[i++]));
// Add leading zeros, decimal point and trailing zeros as required.
str = toFixedPoint(str, e, alphabet.charAt(0));
}
// The caller will add the sign.
return str;
};
})();
// Perform division in the specified base. Called by div and convertBase.
div = (function () {
// Assume non-zero x and k.
function multiply(x, k, base) {
var m, temp, xlo, xhi,
carry = 0,
i = x.length,
klo = k % SQRT_BASE,
khi = k / SQRT_BASE | 0;
for (x = x.slice(); i--;) {
xlo = x[i] % SQRT_BASE;
xhi = x[i] / SQRT_BASE | 0;
m = khi * xlo + xhi * klo;
temp = klo * xlo + ((m % SQRT_BASE) * SQRT_BASE) + carry;
carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;
x[i] = temp % base;
}
if (carry) x = [carry].concat(x);
return x;
}
function compare(a, b, aL, bL) {
var i, cmp;
if (aL != bL) {
cmp = aL > bL ? 1 : -1;
} else {
for (i = cmp = 0; i < aL; i++) {
if (a[i] != b[i]) {
cmp = a[i] > b[i] ? 1 : -1;
break;
}
}
}
return cmp;
}
function subtract(a, b, aL, base) {
var i = 0;
// Subtract b from a.
for (; aL--;) {
a[aL] -= i;
i = a[aL] < b[aL] ? 1 : 0;
a[aL] = i * base + a[aL] - b[aL];
}
// Remove leading zeros.
for (; !a[0] && a.length > 1; a.splice(0, 1));
}
// x: dividend, y: divisor.
return function (x, y, dp, rm, base) {
var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,
yL, yz,
s = x.s == y.s ? 1 : -1,
xc = x.c,
yc = y.c;
// Either NaN, Infinity or 0?
if (!xc || !xc[0] || !yc || !yc[0]) {
return new BigNumber(
// Return NaN if either NaN, or both Infinity or 0.
!x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN :
// Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
xc && xc[0] == 0 || !yc ? s * 0 : s / 0
);
}
q = new BigNumber(s);
qc = q.c = [];
e = x.e - y.e;
s = dp + e + 1;
if (!base) {
base = BASE;
e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);
s = s / LOG_BASE | 0;
}
// Result exponent may be one less then the current value of e.
// The coefficients of the BigNumbers from convertBase may have trailing zeros.
for (i = 0; yc[i] == (xc[i] || 0); i++);
if (yc[i] > (xc[i] || 0)) e--;
if (s < 0) {
qc.push(1);
more = true;
} else {
xL = xc.length;
yL = yc.length;
i = 0;
s += 2;
// Normalise xc and yc so highest order digit of yc is >= base / 2.
n = mathfloor(base / (yc[0] + 1));
// Not necessary, but to handle odd bases where yc[0] == (base / 2) - 1.
// if (n > 1 || n++ == 1 && yc[0] < base / 2) {
if (n > 1) {
yc = multiply(yc, n, base);
xc = multiply(xc, n, base);
yL = yc.length;
xL = xc.length;
}
xi = yL;
rem = xc.slice(0, yL);
remL = rem.length;
// Add zeros to make remainder as long as divisor.
for (; remL < yL; rem[remL++] = 0);
yz = yc.slice();
yz = [0].concat(yz);
yc0 = yc[0];
if (yc[1] >= base / 2) yc0++;
// Not necessary, but to prevent trial digit n > base, when using base 3.
// else if (base == 3 && yc0 == 1) yc0 = 1 + 1e-15;
do {
n = 0;
// Compare divisor and remainder.
cmp = compare(yc, rem, yL, remL);
// If divisor < remainder.
if (cmp < 0) {
// Calculate trial digit, n.
rem0 = rem[0];
if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);
// n is how many times the divisor goes into the current remainder.
n = mathfloor(rem0 / yc0);
// Algorithm:
// product = divisor multiplied by trial digit (n).
// Compare product and remainder.
// If product is greater than remainder:
// Subtract divisor from product, decrement trial digit.
// Subtract product from remainder.
// If product was less than remainder at the last compare:
// Compare new remainder and divisor.
// If remainder is greater than divisor:
// Subtract divisor from remainder, increment trial digit.
if (n > 1) {
// n may be > base only when base is 3.
if (n >= base) n = base - 1;
// product = divisor * trial digit.
prod = multiply(yc, n, base);
prodL = prod.length;
remL = rem.length;
// Compare product and remainder.
// If product > remainder then trial digit n too high.
// n is 1 too high about 5% of the time, and is not known to have
// ever been more than 1 too high.
while (compare(prod, rem, prodL, remL) == 1) {
n--;
// Subtract divisor from product.
subtract(prod, yL < prodL ? yz : yc, prodL, base);
prodL = prod.length;
cmp = 1;
}
} else {
// n is 0 or 1, cmp is -1.
// If n is 0, there is no need to compare yc and rem again below,
// so change cmp to 1 to avoid it.
// If n is 1, leave cmp as -1, so yc and rem are compared again.
if (n == 0) {
// divisor < remainder, so n must be at least 1.
cmp = n = 1;
}
// product = divisor
prod = yc.slice();
prodL = prod.length;
}
if (prodL < remL) prod = [0].concat(prod);
// Subtract product from remainder.
subtract(rem, prod, remL, base);
remL = rem.length;
// If product was < remainder.
if (cmp == -1) {
// Compare divisor and new remainder.
// If divisor < new remainder, subtract divisor from remainder.
// Trial digit n too low.
// n is 1 too low about 5% of the time, and very rarely 2 too low.
while (compare(yc, rem, yL, remL) < 1) {
n++;
// Subtract divisor from remainder.
subtract(rem, yL < remL ? yz : yc, remL, base);
remL = rem.length;
}
}
} else if (cmp === 0) {
n++;
rem = [0];
} // else cmp === 1 and n will be 0
// Add the next digit, n, to the result array.
qc[i++] = n;
// Update the remainder.
if (rem[0]) {
rem[remL++] = xc[xi] || 0;
} else {
rem = [xc[xi]];
remL = 1;
}
} while ((xi++ < xL || rem[0] != null) && s--);
more = rem[0] != null;
// Leading zero?
if (!qc[0]) qc.splice(0, 1);
}
if (base == BASE) {
// To calculate q.e, first get the number of digits of qc[0].
for (i = 1, s = qc[0]; s >= 10; s /= 10, i++);
round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);
// Caller is convertBase.
} else {
q.e = e;
q.r = +more;
}
return q;
};
})();
/*
* Return a string representing the value of BigNumber n in fixed-point or exponential
* notation rounded to the specified decimal places or significant digits.
*
* n: a BigNumber.
* i: the index of the last digit required (i.e. the digit that may be rounded up).
* rm: the rounding mode.
* id: 1 (toExponential) or 2 (toPrecision).
*/
function format(n, i, rm, id) {
var c0, e, ne, len, str;
if (rm == null) rm = ROUNDING_MODE;
else intCheck(rm, 0, 8);
if (!n.c) return n.toString();
c0 = n.c[0];
ne = n.e;
if (i == null) {
str = coeffToString(n.c);
str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)
? toExponential(str, ne)
: toFixedPoint(str, ne, '0');
} else {
n = round(new BigNumber(n), i, rm);
// n.e may have changed if the value was rounded up.
e = n.e;
str = coeffToString(n.c);
len = str.length;
// toPrecision returns exponential notation if the number of significant digits
// specified is less than the number of digits necessary to represent the integer
// part of the value in fixed-point notation.
// Exponential notation.
if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {
// Append zeros?
for (; len < i; str += '0', len++);
str = toExponential(str, e);
// Fixed-point notation.
} else {
i -= ne;
str = toFixedPoint(str, e, '0');
// Append zeros?
if (e + 1 > len) {
if (--i > 0) for (str += '.'; i--; str += '0');
} else {
i += e - len;
if (i > 0) {
if (e + 1 == len) str += '.';
for (; i--; str += '0');
}
}
}
}
return n.s < 0 && c0 ? '-' + str : str;
}
// Handle BigNumber.max and BigNumber.min.
function maxOrMin(args, method) {
var n,
i = 1,
m = new BigNumber(args[0]);
for (; i < args.length; i++) {
n = new BigNumber(args[i]);
// If any number is NaN, return NaN.
if (!n.s) {
m = n;
break;
} else if (method.call(m, n)) {
m = n;
}
}
return m;
}
/*
* Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.
* Called by minus, plus and times.
*/
function normalise(n, c, e) {
var i = 1,
j = c.length;
// Remove trailing zeros.
for (; !c[--j]; c.pop());
// Calculate the base 10 exponent. First get the number of digits of c[0].
for (j = c[0]; j >= 10; j /= 10, i++);
// Overflow?
if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {
// Infinity.
n.c = n.e = null;
// Underflow?
} else if (e < MIN_EXP) {
// Zero.
n.c = [n.e = 0];
} else {
n.e = e;
n.c = c;
}
return n;
}
// Handle values that fail the validity test in BigNumber.
parseNumeric = (function () {
var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i,
dotAfter = /^([^.]+)\.$/,
dotBefore = /^\.([^.]+)$/,
isInfinityOrNaN = /^-?(Infinity|NaN)$/,
whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
return function (x, str, isNum, b) {
var base,
s = isNum ? str : str.replace(whitespaceOrPlus, '');
// No exception on ±Infinity or NaN.
if (isInfinityOrNaN.test(s)) {
x.s = isNaN(s) ? null : s < 0 ? -1 : 1;
} else {
if (!isNum) {
// basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i
s = s.replace(basePrefix, function (m, p1, p2) {
base = (p2 = p2.toLowerCase()) == 'x' ? 16 : p2 == 'b' ? 2 : 8;
return !b || b == base ? p1 : m;
});
if (b) {
base = b;
// E.g. '1.' to '1', '.1' to '0.1'
s = s.replace(dotAfter, '$1').replace(dotBefore, '0.$1');
}
if (str != s) return new BigNumber(s, base);
}
// '[BigNumber Error] Not a number: {n}'
// '[BigNumber Error] Not a base {b} number: {n}'
if (BigNumber.DEBUG) {
throw Error
(bignumberError + 'Not a' + (b ? ' base ' + b : '') + ' number: ' + str);
}
// NaN
x.s = null;
}
x.c = x.e = null;
}
})();
/*
* Round x to sd significant digits using rounding mode rm. Check for over/under-flow.
* If r is truthy, it is known that there are more digits after the rounding digit.
*/
function round(x, sd, rm, r) {
var d, i, j, k, n, ni, rd,
xc = x.c,
pows10 = POWS_TEN;
// if x is not Infinity or NaN...
if (xc) {
// rd is the rounding digit, i.e. the digit after the digit that may be rounded up.
// n is a base 1e14 number, the value of the element of array x.c containing rd.
// ni is the index of n within x.c.
// d is the number of digits of n.
// i is the index of rd within n including leading zeros.
// j is the actual index of rd within n (if < 0, rd is a leading zero).
out: {
// Get the number of digits of the first element of xc.
for (d = 1, k = xc[0]; k >= 10; k /= 10, d++);
i = sd - d;
// If the rounding digit is in the first element of xc...
if (i < 0) {
i += LOG_BASE;
j = sd;
n = xc[ni = 0];
// Get the rounding digit at index j of n.
rd = n / pows10[d - j - 1] % 10 | 0;
} else {
ni = mathceil((i + 1) / LOG_BASE);
if (ni >= xc.length) {
if (r) {
// Needed by sqrt.
for (; xc.length <= ni; xc.push(0));
n = rd = 0;
d = 1;
i %= LOG_BASE;
j = i - LOG_BASE + 1;
} else {
break out;
}
} else {
n = k = xc[ni];
// Get the number of digits of n.
for (d = 1; k >= 10; k /= 10, d++);
// Get the index of rd within n.
i %= LOG_BASE;
// Get the index of rd within n, adjusted for leading zeros.
// The number of leading zeros of n is given by LOG_BASE - d.
j = i - LOG_BASE + d;
// Get the rounding digit at index j of n.
rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;
}
}
r = r || sd < 0 ||
// Are there any non-zero digits after the rounding digit?
// The expression n % pows10[d - j - 1] returns all digits of n to the right
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);
r = rm < 4
? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))
: rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 &&
// Check whether the digit to the left of the rounding digit is odd.
((i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10) & 1 ||
rm == (x.s < 0 ? 8 : 7));
if (sd < 1 || !xc[0]) {
xc.length = 0;
if (r) {
// Convert sd to decimal places.
sd -= x.e + 1;
// 1, 0.1, 0.01, 0.001, 0.0001 etc.
xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];
x.e = -sd || 0;
} else {
// Zero.
xc[0] = x.e = 0;
}
return x;
}
// Remove excess digits.
if (i == 0) {
xc.length = ni;
k = 1;
ni--;
} else {
xc.length = ni + 1;
k = pows10[LOG_BASE - i];
// E.g. 56700 becomes 56000 if 7 is the rounding digit.
// j > 0 means i > number of leading zeros of n.
xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;
}
// Round up?
if (r) {
for (; ;) {
// If the digit to be rounded up is in the first element of xc...
if (ni == 0) {
// i will be the length of xc[0] before k is added.
for (i = 1, j = xc[0]; j >= 10; j /= 10, i++);
j = xc[0] += k;
for (k = 1; j >= 10; j /= 10, k++);
// if i != k the length has increased.
if (i != k) {
x.e++;
if (xc[0] == BASE) xc[0] = 1;
}
break;
} else {
xc[ni] += k;
if (xc[ni] != BASE) break;
xc[ni--] = 0;
k = 1;
}
}
}
// Remove trailing zeros.
for (i = xc.length; xc[--i] === 0; xc.pop());
}
// Overflow? Infinity.
if (x.e > MAX_EXP) {
x.c = x.e = null;
// Underflow? Zero.
} else if (x.e < MIN_EXP) {
x.c = [x.e = 0];
}
}
return x;
}
function valueOf(n) {
var str,
e = n.e;
if (e === null) return n.toString();
str = coeffToString(n.c);
str = e <= TO_EXP_NEG || e >= TO_EXP_POS
? toExponential(str, e)
: toFixedPoint(str, e, '0');
return n.s < 0 ? '-' + str : str;
}
// PROTOTYPE/INSTANCE METHODS
/*
* Return a new BigNumber whose value is the absolute value of this BigNumber.
*/
P.absoluteValue = P.abs = function () {
var x = new BigNumber(this);
if (x.s < 0) x.s = 1;
return x;
};
/*
* Return
* 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),
* -1 if the value of this BigNumber is less than the value of BigNumber(y, b),
* 0 if they have the same value,
* or null if the value of either is NaN.
*/
P.comparedTo = function (y, b) {
return compare(this, new BigNumber(y, b));
};
/*
* If dp is undefined or null or true or false, return the number of decimal places of the
* value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.
*
* Otherwise, if dp is a number, return a new BigNumber whose value is the value of this
* BigNumber rounded to a maximum of dp decimal places using rounding mode rm, or
* ROUNDING_MODE if rm is omitted.
*
* [dp] {number} Decimal places: integer, 0 to MAX inclusive.
* [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
*
* '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'
*/
P.decimalPlaces = P.dp = function (dp, rm) {
var c, n, v,
x = this;
if (dp != null) {
intCheck(dp, 0, MAX);
if (rm == null) rm = ROUNDING_MODE;
else intCheck(rm, 0, 8);
return round(new BigNumber(x), dp + x.e + 1, rm);
}
if (!(c = x.c)) return null;
n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;
// Subtract the number of trailing zeros of the last number.
if (v = c[v]) for (; v % 10 == 0; v /= 10, n--);
if (n < 0) n = 0;
return n;
};
/*
* n / 0 = I
* n / N = N
* n / I = 0
* 0 / n = 0
* 0 / 0 = N
* 0 / N = N
* 0 / I = 0
* N / n = N
* N / 0 = N
* N / N = N
* N / I = N
* I / n = I
* I / 0 = I
* I / N = N
* I / I = N
*
* Return a new BigNumber whose value is the value of this BigNumber divided by the value of
* BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.
*/
P.dividedBy = P.div = function (y, b) {
return div(this, new BigNumber(y, b), DECIMAL_PLACES, ROUNDING_MODE);
};
/*
* Return a new BigNumber whose value is the integer part of dividing the value of this
* BigNumber by the value of BigNumber(y, b).
*/
P.dividedToIntegerBy = P.idiv = function (y, b) {
return div(this, new BigNumber(y, b), 0, 1);
};
/*
* Return a BigNumber whose value is the value of this BigNumber exponentiated by n.
*
* If m is present, return the result modulo m.
* If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.
* If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using ROUNDING_MODE.
*
* The modular power operation works efficiently when x, n, and m are integers, otherwise it
* is equivalent to calculating x.exponentiatedBy(n).modulo(m) with a POW_PRECISION of 0.
*
* n {number|string|BigNumber} The exponent. An integer.
* [m] {number|string|BigNumber} The modulus.
*
* '[BigNumber Error] Exponent not an integer: {n}'
*/
P.exponentiatedBy = P.pow = function (n, m) {
var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y,
x = this;
n = new BigNumber(n);
// Allow NaN and ±Infinity, but not other non-integers.
if (n.c && !n.isInteger()) {
throw Error
(bignumberError + 'Exponent not an integer: ' + valueOf(n));
}
if (m != null) m = new BigNumber(m);
// Exponent of MAX_SAFE_INTEGER is 15.
nIsBig = n.e > 14;
// If x is NaN, ±Infinity, ±0 or ±1, or n is ±Infinity, NaN or ±0.
if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {
// The sign of the result of pow when x is negative depends on the evenness of n.
// If +n overflows to ±Infinity, the evenness of n would be not be known.
y = new BigNumber(Math.pow(+valueOf(x), nIsBig ? 2 - isOdd(n) : +valueOf(n)));
return m ? y.mod(m) : y;
}
nIsNeg = n.s < 0;
if (m) {
// x % m returns NaN if abs(m) is zero, or m is NaN.
if (m.c ? !m.c[0] : !m.s) return new BigNumber(NaN);
isModExp = !nIsNeg && x.isInteger() && m.isInteger();
if (isModExp) x = x.mod(m);
// Overflow to ±Infinity: >=2**1e10 or >=1.0000024**1e15.
// Underflow to ±0: <=0.79**1e10 or <=0.9999975**1e15.
} else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0
// [1, 240000000]
? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7
// [80000000000000] [99999750000000]
: x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {
// If x is negative and n is odd, k = -0, else k = 0.
k = x.s < 0 && isOdd(n) ? -0 : 0;
// If x >= 1, k = ±Infinity.
if (x.e > -1) k = 1 / k;
// If n is negative return ±0, else return ±Infinity.
return new BigNumber(nIsNeg ? 1 / k : k);
} else if (POW_PRECISION) {
// Truncating each coefficient array to a length of k after each multiplication
// equates to truncating significant digits to POW_PRECISION + [28, 41],
// i.e. there will be a minimum of 28 guard digits retained.
k = mathceil(POW_PRECISION / LOG_BASE + 2);
}
if (nIsBig) {
half = new BigNumber(0.5);
if (nIsNeg) n.s = 1;
nIsOdd = isOdd(n);
} else {
i = Math.abs(+valueOf(n));
nIsOdd = i % 2;
}
y = new BigNumber(ONE);
// Performs 54 loop iterations for n of 9007199254740991.
for (; ;) {
if (nIsOdd) {
y = y.times(x);
if (!y.c) break;
if (k) {
if (y.c.length > k) y.c.length = k;
} else if (isModExp) {
y = y.mod(m); //y = y.minus(div(y, m, 0, MODULO_MODE).times(m));
}
}
if (i) {
i = mathfloor(i / 2);
if (i === 0) break;
nIsOdd = i % 2;
} else {
n = n.times(half);
round(n, n.e + 1, 1);
if (n.e > 14) {
nIsOdd = isOdd(n);
} else {
i = +valueOf(n);
if (i === 0) break;
nIsOdd = i % 2;
}
}
x = x.times(x);
if (k) {
if (x.c && x.c.length > k) x.c.length = k;
} else if (isModExp) {
x = x.mod(m); //x = x.minus(div(x, m, 0, MODULO_MODE).times(m));
}
}
if (isModExp) return y;
if (nIsNeg) y = ONE.div(y);
return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;
};
/*
* Return a new BigNumber whose value is the value of this BigNumber rounded to an integer
* using rounding mode rm, or ROUNDING_MODE if rm is omitted.
*
* [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
*
* '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {rm}'
*/
P.integerValue = function (rm) {
var n = new BigNumber(this);
if (rm == null) rm = ROUNDING_MODE;
else intCheck(rm, 0, 8);
return round(n, n.e + 1, rm);
};
/*
* Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),
* otherwise return false.
*/
P.isEqualTo = P.eq = function (y, b) {
return compare(this, new BigNumber(y, b)) === 0;
};
/*
* Return true if the value of this BigNumber is a finite number, otherwise return false.
*/
P.isFinite = function () {
return !!this.c;
};
/*
* Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),
* otherwise return false.
*/
P.isGreaterThan = P.gt = function (y, b) {
return compare(this, new BigNumber(y, b)) > 0;
};
/*
* Return true if the value of this BigNumber is greater than or equal to the value of
* BigNumber(y, b), otherwise return false.
*/
P.isGreaterThanOrEqualTo = P.gte = function (y, b) {
return (b = compare(this, new BigNumber(y, b))) === 1 || b === 0;
};
/*
* Return true if the value of this BigNumber is an integer, otherwise return false.
*/
P.isInteger = function () {
return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;
};
/*
* Return true if the value of this BigNumber is less than the value of BigNumber(y, b),
* otherwise return false.
*/
P.isLessThan = P.lt = function (y, b) {
return compare(this, new BigNumber(y, b)) < 0;
};
/*
* Return true if the value of this BigNumber is less than or equal to the value of
* BigNumber(y, b), otherwise return false.
*/
P.isLessThanOrEqualTo = P.lte = function (y, b) {
return (b = compare(this, new BigNumber(y, b))) === -1 || b === 0;
};
/*
* Return true if the value of this BigNumber is NaN, otherwise return false.
*/
P.isNaN = function () {
return !this.s;
};
/*
* Return true if the value of this BigNumber is negative, otherwise return false.
*/
P.isNegative = function () {
return this.s < 0;
};
/*
* Return true if the value of this BigNumber is positive, otherwise return false.
*/
P.isPositive = function () {
return this.s > 0;
};
/*
* Return true if the value of this BigNumber is 0 or -0, otherwise return false.
*/
P.isZero = function () {
return !!this.c && this.c[0] == 0;
};
/*
* n - 0 = n
* n - N = N
* n - I = -I
* 0 - n = -n
* 0 - 0 = 0
* 0 - N = N
* 0 - I = -I
* N - n = N
* N - 0 = N
* N - N = N
* N - I = N
* I - n = I
* I - 0 = I
* I - N = N
* I - I = N
*
* Return a new BigNumber whose value is the value of this BigNumber minus the value of
* BigNumber(y, b).
*/
P.minus = function (y, b) {
var i, j, t, xLTy,
x = this,
a = x.s;
y = new BigNumber(y, b);
b = y.s;
// Either NaN?
if (!a || !b) return new BigNumber(NaN);
// Signs differ?
if (a != b) {
y.s = -b;
return x.plus(y);
}
var xe = x.e / LOG_BASE,
ye = y.e / LOG_BASE,
xc = x.c,
yc = y.c;
if (!xe || !ye) {
// Either Infinity?
if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber(yc ? x : NaN);
// Either zero?
if (!xc[0] || !yc[0]) {
// Return y if y is non-zero, x if x is non-zero, or zero if both are zero.
return yc[0] ? (y.s = -b, y) : new BigNumber(xc[0] ? x :
// IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
ROUNDING_MODE == 3 ? -0 : 0);
}
}
xe = bitFloor(xe);
ye = bitFloor(ye);
xc = xc.slice();
// Determine which is the bigger number.
if (a = xe - ye) {
if (xLTy = a < 0) {
a = -a;
t = xc;
} else {
ye = xe;
t = yc;
}
t.reverse();
// Prepend zeros to equalise exponents.
for (b = a; b--; t.push(0));
t.reverse();
} else {
// Exponents equal. Check digit by digit.
j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;
for (a = b = 0; b < j; b++) {
if (xc[b] != yc[b]) {
xLTy = xc[b] < yc[b];
break;
}
}
}
// x < y? Point xc to the array of the bigger number.
if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;
b = (j = yc.length) - (i = xc.length);
// Append zeros to xc if shorter.
// No need to add zeros to yc if shorter as subtract only needs to start at yc.length.
if (b > 0) for (; b--; xc[i++] = 0);
b = BASE - 1;
// Subtract yc from xc.
for (; j > a;) {
if (xc[--j] < yc[j]) {
for (i = j; i && !xc[--i]; xc[i] = b);
--xc[i];
xc[j] += BASE;
}
xc[j] -= yc[j];
}
// Remove leading zeros and adjust exponent accordingly.
for (; xc[0] == 0; xc.splice(0, 1), --ye);
// Zero?
if (!xc[0]) {
// Following IEEE 754 (2008) 6.3,
// n - n = +0 but n - n = -0 when rounding towards -Infinity.
y.s = ROUNDING_MODE == 3 ? -1 : 1;
y.c = [y.e = 0];
return y;
}
// No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity
// for finite x and y.
return normalise(y, xc, ye);
};
/*
* n % 0 = N
* n % N = N
* n % I = n
* 0 % n = 0
* -0 % n = -0
* 0 % 0 = N
* 0 % N = N
* 0 % I = 0
* N % n = N
* N % 0 = N
* N % N = N
* N % I = N
* I % n = N
* I % 0 = N
* I % N = N
* I % I = N
*
* Return a new BigNumber whose value is the value of this BigNumber modulo the value of
* BigNumber(y, b). The result depends on the value of MODULO_MODE.
*/
P.modulo = P.mod = function (y, b) {
var q, s,
x = this;
y = new BigNumber(y, b);
// Return NaN if x is Infinity or NaN, or y is NaN or zero.
if (!x.c || !y.s || y.c && !y.c[0]) {
return new BigNumber(NaN);
// Return x if y is Infinity or x is zero.
} else if (!y.c || x.c && !x.c[0]) {
return new BigNumber(x);
}
if (MODULO_MODE == 9) {
// Euclidian division: q = sign(y) * floor(x / abs(y))
// r = x - qy where 0 <= r < abs(y)
s = y.s;
y.s = 1;
q = div(x, y, 0, 3);
y.s = s;
q.s *= s;
} else {
q = div(x, y, 0, MODULO_MODE);
}
y = x.minus(q.times(y));
// To match JavaScript %, ensure sign of zero is sign of dividend.
if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;
return y;
};
/*
* n * 0 = 0
* n * N = N
* n * I = I
* 0 * n = 0
* 0 * 0 = 0
* 0 * N = N
* 0 * I = N
* N * n = N
* N * 0 = N
* N * N = N
* N * I = N
* I * n = I
* I * 0 = N
* I * N = N
* I * I = I
*
* Return a new BigNumber whose value is the value of this BigNumber multiplied by the value
* of BigNumber(y, b).
*/
P.multipliedBy = P.times = function (y, b) {
var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,
base, sqrtBase,
x = this,
xc = x.c,
yc = (y = new BigNumber(y, b)).c;
// Either NaN, ±Infinity or ±0?
if (!xc || !yc || !xc[0] || !yc[0]) {
// Return NaN if either is NaN, or one is 0 and the other is Infinity.
if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {
y.c = y.e = y.s = null;
} else {
y.s *= x.s;
// Return ±Infinity if either is ±Infinity.
if (!xc || !yc) {
y.c = y.e = null;
// Return ±0 if either is ±0.
} else {
y.c = [0];
y.e = 0;
}
}
return y;
}
e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);
y.s *= x.s;
xcL = xc.length;
ycL = yc.length;
// Ensure xc points to longer array and xcL to its length.
if (xcL < ycL) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;
// Initialise the result array with zeros.
for (i = xcL + ycL, zc = []; i--; zc.push(0));
base = BASE;
sqrtBase = SQRT_BASE;
for (i = ycL; --i >= 0;) {
c = 0;
ylo = yc[i] % sqrtBase;
yhi = yc[i] / sqrtBase | 0;
for (k = xcL, j = i + k; j > i;) {
xlo = xc[--k] % sqrtBase;
xhi = xc[k] / sqrtBase | 0;
m = yhi * xlo + xhi * ylo;
xlo = ylo * xlo + ((m % sqrtBase) * sqrtBase) + zc[j] + c;
c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;
zc[j--] = xlo % base;
}
zc[j] = c;
}
if (c) {
++e;
} else {
zc.splice(0, 1);
}
return normalise(y, zc, e);
};
/*
* Return a new BigNumber whose value is the value of this BigNumber negated,
* i.e. multiplied by -1.
*/
P.negated = function () {
var x = new BigNumber(this);
x.s = -x.s || null;
return x;
};
/*
* n + 0 = n
* n + N = N
* n + I = I
* 0 + n = n
* 0 + 0 = 0
* 0 + N = N
* 0 + I = I
* N + n = N
* N + 0 = N
* N + N = N
* N + I = N
* I + n = I
* I + 0 = I
* I + N = N
* I + I = I
*
* Return a new BigNumber whose value is the value of this BigNumber plus the value of
* BigNumber(y, b).
*/
P.plus = function (y, b) {
var t,
x = this,
a = x.s;
y = new BigNumber(y, b);
b = y.s;
// Either NaN?
if (!a || !b) return new BigNumber(NaN);
// Signs differ?
if (a != b) {
y.s = -b;
return x.minus(y);
}
var xe = x.e / LOG_BASE,
ye = y.e / LOG_BASE,
xc = x.c,
yc = y.c;
if (!xe || !ye) {
// Return ±Infinity if either ±Infinity.
if (!xc || !yc) return new BigNumber(a / 0);
// Either zero?
// Return y if y is non-zero, x if x is non-zero, or zero if both are zero.
if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber(xc[0] ? x : a * 0);
}
xe = bitFloor(xe);
ye = bitFloor(ye);
xc = xc.slice();
// Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.
if (a = xe - ye) {
if (a > 0) {
ye = xe;
t = yc;
} else {
a = -a;
t = xc;
}
t.reverse();
for (; a--; t.push(0));
t.reverse();
}
a = xc.length;
b = yc.length;
// Point xc to the longer array, and b to the shorter length.
if (a - b < 0) t = yc, yc = xc, xc = t, b = a;
// Only start adding at yc.length - 1 as the further digits of xc can be ignored.
for (a = 0; b;) {
a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;
xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;
}
if (a) {
xc = [a].concat(xc);
++ye;
}
// No need to check for zero, as +x + +y != 0 && -x + -y != 0
// ye = MAX_EXP + 1 possible
return normalise(y, xc, ye);
};
/*
* If sd is undefined or null or true or false, return the number of significant digits of
* the value of this BigNumber, or null if the value of this BigNumber is ±Infinity or NaN.
* If sd is true include integer-part trailing zeros in the count.
*
* Otherwise, if sd is a number, return a new BigNumber whose value is the value of this
* BigNumber rounded to a maximum of sd significant digits using rounding mode rm, or
* ROUNDING_MODE if rm is omitted.
*
* sd {number|boolean} number: significant digits: integer, 1 to MAX inclusive.
* boolean: whether to count integer-part trailing zeros: true or false.
* [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
*
* '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'
*/
P.precision = P.sd = function (sd, rm) {
var c, n, v,
x = this;
if (sd != null && sd !== !!sd) {
intCheck(sd, 1, MAX);
if (rm == null) rm = ROUNDING_MODE;
else intCheck(rm, 0, 8);
return round(new BigNumber(x), sd, rm);
}
if (!(c = x.c)) return null;
v = c.length - 1;
n = v * LOG_BASE + 1;
if (v = c[v]) {
// Subtract the number of trailing zeros of the last element.
for (; v % 10 == 0; v /= 10, n--);
// Add the number of digits of the first element.
for (v = c[0]; v >= 10; v /= 10, n++);
}
if (sd && x.e + 1 > n) n = x.e + 1;
return n;
};
/*
* Return a new BigNumber whose value is the value of this BigNumber shifted by k places
* (powers of 10). Shift to the right if n > 0, and to the left if n < 0.
*
* k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.
*
* '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {k}'
*/
P.shiftedBy = function (k) {
intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
return this.times('1e' + k);
};
/*
* sqrt(-n) = N
* sqrt(N) = N
* sqrt(-I) = N
* sqrt(I) = I
* sqrt(0) = 0
* sqrt(-0) = -0
*
* Return a new BigNumber whose value is the square root of the value of this BigNumber,
* rounded according to DECIMAL_PLACES and ROUNDING_MODE.
*/
P.squareRoot = P.sqrt = function () {
var m, n, r, rep, t,
x = this,
c = x.c,
s = x.s,
e = x.e,
dp = DECIMAL_PLACES + 4,
half = new BigNumber('0.5');
// Negative/NaN/Infinity/zero?
if (s !== 1 || !c || !c[0]) {
return new BigNumber(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);
}
// Initial estimate.
s = Math.sqrt(+valueOf(x));
// Math.sqrt underflow/overflow?
// Pass x to Math.sqrt as integer, then adjust the exponent of the result.
if (s == 0 || s == 1 / 0) {
n = coeffToString(c);
if ((n.length + e) % 2 == 0) n += '0';
s = Math.sqrt(+n);
e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);
if (s == 1 / 0) {
n = '1e' + e;
} else {
n = s.toExponential();
n = n.slice(0, n.indexOf('e') + 1) + e;
}
r = new BigNumber(n);
} else {
r = new BigNumber(s + '');
}
// Check for zero.
// r could be zero if MIN_EXP is changed after the this value was created.
// This would cause a division by zero (x/t) and hence Infinity below, which would cause
// coeffToString to throw.
if (r.c[0]) {
e = r.e;
s = e + dp;
if (s < 3) s = 0;
// Newton-Raphson iteration.
for (; ;) {
t = r;
r = half.times(t.plus(div(x, t, dp, 1)));
if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {
// The exponent of r may here be one less than the final result exponent,
// e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits
// are indexed correctly.
if (r.e < e) --s;
n = n.slice(s - 3, s + 1);
// The 4th rounding digit may be in error by -1 so if the 4 rounding digits
// are 9999 or 4999 (i.e. approaching a rounding boundary) continue the
// iteration.
if (n == '9999' || !rep && n == '4999') {
// On the first iteration only, check to see if rounding up gives the
// exact result as the nines may infinitely repeat.
if (!rep) {
round(t, t.e + DECIMAL_PLACES + 2, 0);
if (t.times(t).eq(x)) {
r = t;
break;
}
}
dp += 4;
s += 4;
rep = 1;
} else {
// If rounding digits are null, 0{0,4} or 50{0,3}, check for exact
// result. If not, then there are further digits and m will be truthy.
if (!+n || !+n.slice(1) && n.charAt(0) == '5') {
// Truncate to the first rounding digit.
round(r, r.e + DECIMAL_PLACES + 2, 1);
m = !r.times(r).eq(x);
}
break;
}
}
}
}
return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);
};
/*
* Return a string representing the value of this BigNumber in exponential notation and
* rounded using ROUNDING_MODE to dp fixed decimal places.
*
* [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
* [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
*
* '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'
*/
P.toExponential = function (dp, rm) {
if (dp != null) {
intCheck(dp, 0, MAX);
dp++;
}
return format(this, dp, rm, 1);
};
/*
* Return a string representing the value of this BigNumber in fixed-point notation rounding
* to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.
*
* Note: as with JavaScript's number type, (-0).toFixed(0) is '0',
* but e.g. (-0.00001).toFixed(0) is '-0'.
*
* [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
* [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
*
* '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'
*/
P.toFixed = function (dp, rm) {
if (dp != null) {
intCheck(dp, 0, MAX);
dp = dp + this.e + 1;
}
return format(this, dp, rm);
};
/*
* Return a string representing the value of this BigNumber in fixed-point notation rounded
* using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties
* of the format or FORMAT object (see BigNumber.set).
*
* The formatting object may contain some or all of the properties shown below.
*
* FORMAT = {
* prefix: '',
* groupSize: 3,
* secondaryGroupSize: 0,
* groupSeparator: ',',
* decimalSeparator: '.',
* fractionGroupSize: 0,
* fractionGroupSeparator: '\xA0', // non-breaking space
* suffix: ''
* };
*
* [dp] {number} Decimal places. Integer, 0 to MAX inclusive.
* [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
* [format] {object} Formatting options. See FORMAT pbject above.
*
* '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {dp|rm}'
* '[BigNumber Error] Argument not an object: {format}'
*/
P.toFormat = function (dp, rm, format) {
var str,
x = this;
if (format == null) {
if (dp != null && rm && typeof rm == 'object') {
format = rm;
rm = null;
} else if (dp && typeof dp == 'object') {
format = dp;
dp = rm = null;
} else {
format = FORMAT;
}
} else if (typeof format != 'object') {
throw Error
(bignumberError + 'Argument not an object: ' + format);
}
str = x.toFixed(dp, rm);
if (x.c) {
var i,
arr = str.split('.'),
g1 = +format.groupSize,
g2 = +format.secondaryGroupSize,
groupSeparator = format.groupSeparator || '',
intPart = arr[0],
fractionPart = arr[1],
isNeg = x.s < 0,
intDigits = isNeg ? intPart.slice(1) : intPart,
len = intDigits.length;
if (g2) i = g1, g1 = g2, g2 = i, len -= i;
if (g1 > 0 && len > 0) {
i = len % g1 || g1;
intPart = intDigits.substr(0, i);
for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);
if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);
if (isNeg) intPart = '-' + intPart;
}
str = fractionPart
? intPart + (format.decimalSeparator || '') + ((g2 = +format.fractionGroupSize)
? fractionPart.replace(new RegExp('\\d{' + g2 + '}\\B', 'g'),
'$&' + (format.fractionGroupSeparator || ''))
: fractionPart)
: intPart;
}
return (format.prefix || '') + str + (format.suffix || '');
};
/*
* Return an array of two BigNumbers representing the value of this BigNumber as a simple
* fraction with an integer numerator and an integer denominator.
* The denominator will be a positive non-zero value less than or equal to the specified
* maximum denominator. If a maximum denominator is not specified, the denominator will be
* the lowest value necessary to represent the number exactly.
*
* [md] {number|string|BigNumber} Integer >= 1, or Infinity. The maximum denominator.
*
* '[BigNumber Error] Argument {not an integer|out of range} : {md}'
*/
P.toFraction = function (md) {
var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s,
x = this,
xc = x.c;
if (md != null) {
n = new BigNumber(md);
// Throw if md is less than one or is not an integer, unless it is Infinity.
if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {
throw Error
(bignumberError + 'Argument ' +
(n.isInteger() ? 'out of range: ' : 'not an integer: ') + valueOf(n));
}
}
if (!xc) return new BigNumber(x);
d = new BigNumber(ONE);
n1 = d0 = new BigNumber(ONE);
d1 = n0 = new BigNumber(ONE);
s = coeffToString(xc);
// Determine initial denominator.
// d is a power of 10 and the minimum max denominator that specifies the value exactly.
e = d.e = s.length - x.e - 1;
d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];
md = !md || n.comparedTo(d) > 0 ? (e > 0 ? d : n1) : n;
exp = MAX_EXP;
MAX_EXP = 1 / 0;
n = new BigNumber(s);
// n0 = d1 = 0
n0.c[0] = 0;
for (; ;) {
q = div(n, d, 0, 1);
d2 = d0.plus(q.times(d1));
if (d2.comparedTo(md) == 1) break;
d0 = d1;
d1 = d2;
n1 = n0.plus(q.times(d2 = n1));
n0 = d2;
d = n.minus(q.times(d2 = d));
n = d2;
}
d2 = div(md.minus(d0), d1, 0, 1);
n0 = n0.plus(d2.times(n1));
d0 = d0.plus(d2.times(d1));
n0.s = n1.s = x.s;
e = e * 2;
// Determine which fraction is closer to x, n0/d0 or n1/d1
r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(
div(n0, d0, e, ROUNDING_MODE).minus(x).abs()) < 1 ? [n1, d1] : [n0, d0];
MAX_EXP = exp;
return r;
};
/*
* Return the value of this BigNumber converted to a number primitive.
*/
P.toNumber = function () {
return +valueOf(this);
};
/*
* Return a string representing the value of this BigNumber rounded to sd significant digits
* using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits
* necessary to represent the integer part of the value in fixed-point notation, then use
* exponential notation.
*
* [sd] {number} Significant digits. Integer, 1 to MAX inclusive.
* [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
*
* '[BigNumber Error] Argument {not a primitive number|not an integer|out of range}: {sd|rm}'
*/
P.toPrecision = function (sd, rm) {
if (sd != null) intCheck(sd, 1, MAX);
return format(this, sd, rm, 2);
};
/*
* Return a string representing the value of this BigNumber in base b, or base 10 if b is
* omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and
* ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent
* that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than
* TO_EXP_NEG, return exponential notation.
*
* [b] {number} Integer, 2 to ALPHABET.length inclusive.
*
* '[BigNumber Error] Base {not a primitive number|not an integer|out of range}: {b}'
*/
P.toString = function (b) {
var str,
n = this,
s = n.s,
e = n.e;
// Infinity or NaN?
if (e === null) {
if (s) {
str = 'Infinity';
if (s < 0) str = '-' + str;
} else {
str = 'NaN';
}
} else {
if (b == null) {
str = e <= TO_EXP_NEG || e >= TO_EXP_POS
? toExponential(coeffToString(n.c), e)
: toFixedPoint(coeffToString(n.c), e, '0');
} else if (b === 10) {
n = round(new BigNumber(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
str = toFixedPoint(coeffToString(n.c), n.e, '0');
} else {
intCheck(b, 2, ALPHABET.length, 'Base');
str = convertBase(toFixedPoint(coeffToString(n.c), e, '0'), 10, b, s, true);
}
if (s < 0 && n.c[0]) str = '-' + str;
}
return str;
};
/*
* Return as toString, but do not accept a base argument, and include the minus sign for
* negative zero.
*/
P.valueOf = P.toJSON = function () {
return valueOf(this);
};
P._isBigNumber = true;
P[Symbol.toStringTag] = 'BigNumber';
// Node.js v10.12.0+
P[Symbol.for('nodejs.util.inspect.custom')] = P.valueOf;
if (configObject != null) BigNumber.set(configObject);
return BigNumber;
}
// PRIVATE HELPER FUNCTIONS
// These functions don't need access to variables,
// e.g. DECIMAL_PLACES, in the scope of the `clone` function above.
function bitFloor(n) {
var i = n | 0;
return n > 0 || n === i ? i : i - 1;
}
// Return a coefficient array as a string of base 10 digits.
function coeffToString(a) {
var s, z,
i = 1,
j = a.length,
r = a[0] + '';
for (; i < j;) {
s = a[i++] + '';
z = LOG_BASE - s.length;
for (; z--; s = '0' + s);
r += s;
}
// Determine trailing zeros.
for (j = r.length; r.charCodeAt(--j) === 48;);
return r.slice(0, j + 1 || 1);
}
// Compare the value of BigNumbers x and y.
function compare(x, y) {
var a, b,
xc = x.c,
yc = y.c,
i = x.s,
j = y.s,
k = x.e,
l = y.e;
// Either NaN?
if (!i || !j) return null;
a = xc && !xc[0];
b = yc && !yc[0];
// Either zero?
if (a || b) return a ? b ? 0 : -j : i;
// Signs differ?
if (i != j) return i;
a = i < 0;
b = k == l;
// Either Infinity?
if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;
// Compare exponents.
if (!b) return k > l ^ a ? 1 : -1;
j = (k = xc.length) < (l = yc.length) ? k : l;
// Compare digit by digit.
for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;
// Compare lengths.
return k == l ? 0 : k > l ^ a ? 1 : -1;
}
/*
* Check that n is a primitive number, an integer, and in range, otherwise throw.
*/
function intCheck(n, min, max, name) {
if (n < min || n > max || n !== mathfloor(n)) {
throw Error
(bignumberError + (name || 'Argument') + (typeof n == 'number'
? n < min || n > max ? ' out of range: ' : ' not an integer: '
: ' not a primitive number: ') + String(n));
}
}
// Assumes finite n.
function isOdd(n) {
var k = n.c.length - 1;
return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;
}
function toExponential(str, e) {
return (str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str) +
(e < 0 ? 'e' : 'e+') + e;
}
function toFixedPoint(str, e, z) {
var len, zs;
// Negative exponent?
if (e < 0) {
// Prepend zeros.
for (zs = z + '.'; ++e; zs += z);
str = zs + str;
// Positive exponent
} else {
len = str.length;
// Append zeros.
if (++e > len) {
for (zs = z, e -= len; --e; zs += z);
str += zs;
} else if (e < len) {
str = str.slice(0, e) + '.' + str.slice(e);
}
}
return str;
}
// EXPORT
var BigNumber = clone();
var bignumber = /*#__PURE__*/Object.freeze({
__proto__: null,
BigNumber: BigNumber,
'default': BigNumber
});
var BigNumber$1 = getCjsExportFromNamespace(bignumber);
BigNumber$1.config({ RANGE: [-30, 30], EXPONENTIAL_AT: 1e+9 });
BigNumber$1.set({ DECIMAL_PLACES: 30, ROUNDING_MODE: BigNumber$1.ROUND_DOWN }); // equivalent
function Encoder (type, value) {
const throwError = (val) => {
throw new Error(`Error encoding ${val} to ${type}`)
};
const countDecimals = (n) => {
if(Math.floor(n) === n) return 0;
try{
return n.toString().split(".")[1].length
}catch (e){
return 0
}
};
const isString = (val) => typeof val === 'string' || val instanceof String;
const isArray = (val) => val && typeof val === 'object' && val.constructor === Array;
const isObject = (val) => val && typeof val === 'object' && val.constructor === Object;
const isDate = (val) => val instanceof Date;
const isBoolean = (val) => typeof val === 'boolean';
const isNumber = (val) => {
if (isArray(val)) return false
return !isNaN(encodeBigNumber(val).toNumber())
};
const isInteger = (val) => {
if (!isNumber(val)) return false
if (countDecimals(val) === 0) return true
return false
};
const encodeInt = (val) => {
if (!isNumber(val)) throwError(val);
else return parseInt(val)
};
const isFloat = (val) => {
if (!isNumber(val)) return false
if (countDecimals(val) === 0) return false
return true
};
const encodeFloat = (val) => {
if(!isNumber(val)) throwError(val);
if (!BigNumber$1.isBigNumber(val)) val = new BigNumber$1(val);
return {"__fixed__": val.toFixed(30).replace(/^0+(\d)|(\d)0+$/gm, '$1$2')}
};
const encodeNumber = (val) => {
if(!isNumber(val)) throwError(val);
if (isFloat(val)) {
if (!BigNumber$1.isBigNumber(val)) val = new BigNumber$1(val);
return {"__fixed__": val.toFixed(30).replace(/^0+(\d)|(\d)0+$/gm, '$1$2')}
}
if (isInteger(val)) return parseInt(val)
};
const encodeBigNumber = (val) => {
if (!BigNumber$1.isBigNumber(val)) val = new BigNumber$1(val);
return val
};
const encodeBool = (val) => {
if (isBoolean(val)) return val
if (val === 'true' || val === 1) return true
if (val === 'false' || val === 0) return false
throwError(val);
};
const encodeStr = (val) => {
if (isString(val)) return val
if (isDate(val)) return val.toISOString()
return JSON.stringify(val)
};
const encodeDateTime = (val) => {
val = !isDate(val) ? new Date(val) : val;
if (!isDate(val)) throwError(val);
return {'__time__': [
val.getUTCFullYear(),
val.getUTCMonth(),
val.getUTCDate(),
val.getUTCHours(),
val.getUTCMinutes(),
val.getUTCSeconds(),
val.getUTCMilliseconds()
]}
};
const encodeTimeDelta = (val) => {
const time = isDate(val) ? val.getTime() : new Date(val).getTime();
const days = parseInt(time / 1000 / 60 / 60 / 24);
const seconds = (time - (days * 24 * 60 * 60 * 1000)) / 1000;
return {'__delta__':[days, seconds]}
};
const encodeList = (val) => {
if (isArray(val)) return parseObject(val)
try{
val = JSON.parse(val);
}catch(e){
throwError(val);
}
if (isArray(val)) return parseObject(val)
throwError(val);
};
const encodeDict = (val) => {
if (isObject(val)) return parseObject(val)
try{
val = JSON.parse(val);
}catch(e){
throwError(val);
}
if (isObject(val)) return parseObject(val)
throwError(val);
};
const encodeObject = (val) => {
try {
return encodeList(val)
}catch(e){
return encodeDict(val)
}
};
function parseObject (obj) {
const encode = (k, v) => {
if (k === "datetime" || k === "datetime.datetime" ) return Encoder("datetime.datetime", v)
if (k === "timedelta" || k === "datetime.timedelta") return Encoder("datetime.timedelta", v)
if (k !== "__fixed__" && isFloat(v)) return encodeFloat(v)
return v
};
const fixDatetime = (k, v) => {
const isDatetimeObject = (val) => {
let datetimeTypes = ['datetime.datetime', 'datetime', 'datetime.timedelta', 'timedelta'];
return Object.keys(val).length === 1 && datetimeTypes.filter(f => f === Object.keys(val)[0]).length > 0
};
if (v.constructor === Array) {
v.map(val => {
if (Object.keys(val).length === 1 && isDatetimeObject(v)) return val[Object.keys(val)[0]]
//if (isFloat(val)) return encodeFloat(val)
return val
});
}
if (v.constructor === Object) {
if (Object.keys(v).length === 1 && isDatetimeObject(v)) return v[Object.keys(v)[0]]
}
//if (isFloat(v)) return encodeFloat(v)
return v
};
let encodeValues = JSON.stringify(obj, encode);
return JSON.parse(encodeValues, fixDatetime)
}
const encoder = {
str: encodeStr,
string: encodeStr,
float: encodeFloat,
int: encodeInt,
bool: encodeBool,
boolean: encodeBool,
dict: encodeDict,
list: encodeList,
Any: () => value,
"datetime.timedelta": encodeTimeDelta,
"datetime.datetime": encodeDateTime,
timedelta: encodeTimeDelta,
datetime: encodeDateTime,
number: encodeNumber,
object: encodeObject,
bigNumber: encodeBigNumber,
};
if (Object.keys(encoder).includes(type)) return encoder[type](value)
else throw new Error(`Error: ${type} is not a valid encoder type.`)
}
Encoder.BigNumber = BigNumber$1;
var encoder = {
Encoder
};
var encoder_1 = encoder.Encoder;
const { validateTypes: validateTypes$1 } = validators;
const fetch = require('node-fetch').default;
class LamdenMasterNode_API{
constructor(networkInfoObj){
if (!validateTypes$1.isObjectWithKeys(networkInfoObj)) throw new Error(`Expected Object and got Type: ${typeof networkInfoObj}`)
if (!validateTypes$1.isArrayWithValues(networkInfoObj.hosts)) throw new Error(`HOSTS Required (Type: Array)`)
this.hosts = this.validateHosts(networkInfoObj.hosts);
}
//This will throw an error if the protocol wasn't included in the host string
vaidateProtocol(host){
let protocols = ['https://', 'http://'];
if (protocols.map(protocol => host.includes(protocol)).includes(true)) return host
throw new Error('Host String must include http:// or https://')
}
validateHosts(hosts){
return hosts.map(host => this.vaidateProtocol(host.toLowerCase()))
}
get host() {return this.hosts[Math.floor(Math.random() * this.hosts.length)]}
get url() {return this.host}
send(method, path, data, overrideURL, callback){
let parms = '';
if (Object.keys(data).includes('parms')) {
parms = this.createParms(data.parms);
}
let options = {};
if (method === 'POST'){
let headers = {'Content-Type': 'application/json'};
options.method = method;
options.headers = headers;
options.body = data;
}
return fetch(`${overrideURL ? overrideURL : this.url}${path}${parms}`, options)
.then(async (res) => {
if (res.status === 200){
let json = await res.json();
callback(json, undefined);
return json
}else{
let error = validateTypes$1.isStringWithValue(res.statusText) ? res.statusText : false;
callback(undefined, error);
return error
}
})
.catch(err => {
return callback(undefined, err.toString())
})
}
createParms(parms){
if (Object.keys(parms).length === 0) return ''
let parmString = '?';
Object.keys(parms).forEach(key => {
parmString = `${parmString}${key}=${parms[key]}&`;
});
return parmString.slice(0, -1);
}
async getContractInfo(contractName){
const returnInfo = (res) => {
try{
if (res.name) return res
} catch (e){}
return null;
};
let path = `/contracts/${contractName}`;
return this.send('GET', path, {}, undefined, (res, err) => returnInfo(res))
.then(res => returnInfo(res))
}
async getVariable(contract, variable, key = ''){
let parms = {};
if (validateTypes$1.isStringWithValue(key)) parms.key = key;
let path = `/contracts/${contract}/${variable}/`;
const returnValue = (res) => {
try{
if (res.value) return res.value
} catch (e){}
return null;
};
return this.send('GET', path, {parms}, undefined, (res, err) => returnValue(res))
.then(res => returnValue(res))
}
async getContractMethods(contract){
const getMethods = (res) => {
try{
if (res.methods) return res.methods
} catch (e){}
return [];
};
let path = `/contracts/${contract}/methods`;
return this.send('GET', path, {}, undefined, (res, err) => getMethods(res))
.then(res => getMethods(res))
}
async getContractVariables(contract){
const getVariables = (res) => {
try{
if (res.variables) return res
} catch (e){}
return {};
};
let path = `/contracts/${contract}/variables`;
return this.send('GET', path, {}, undefined, (res, err) => getVariables(res))
.then(res => getVariables(res))
}
async pingServer(){
const getStatus = (res) => {
try {
if (res.status) return true;
} catch (e) {}
return false
};
let response = await this.send('GET', '/ping', {}, undefined, (res, err) => getStatus(res));
return getStatus(response)
}
async getCurrencyBalance(vk){
let balanceRes = await this.getVariable('currency', 'balances', vk);
if (!balanceRes) return encoder_1('bigNumber', 0);
if (balanceRes.__fixed__) return encoder_1('bigNumber', balanceRes.__fixed__)
return encoder_1('bigNumber', balanceRes.toString());
}
async contractExists(contractName){
const exists = (res) => {
try {
if (res.name) return true;
} catch (e) {}
return false
};
let path = `/contracts/${contractName}`;
return this.send('GET', path, {}, undefined, (res, err) => exists(res))
.then(res => exists(res))
}
async sendTransaction(data, url = undefined, callback){
return this.send('POST', '/', JSON.stringify(data), url, (res, err) => {
if (err){
if (callback) {
callback(undefined, err);
return;
}
else return err
}
if (callback) {
callback(res, undefined);
return
}
return res;
})
}
async getNonce(sender, callback){
if (!validateTypes$1.isStringHex(sender)) return `${sender} is not a hex string.`
let path = `/nonce/${sender}`;
let url = this.host;
return this.send('GET', path, {}, url, (res, err) => {
if (err){
if (callback) {
callback(undefined, `Unable to get nonce for ${sender} on network ${url}`);
return
}
return `Unable to get nonce for ${sender} on network ${url}`
}
res.masternode = url;
if (callback) {
callback(res, undefined);
return
}
else return res;
})
}
async checkTransaction(hash, callback){
const parms = {hash};
return this.send('GET', '/tx', {parms}, undefined, (res, err) => {
if (err){
if (callback) {
callback(undefined, err);
return;
}
else return err
}
if (callback) {
callback(res, undefined);
return
}
return res;
})
}
}
const { validateTypes: validateTypes$2 } = validators;
class Network {
// Constructor needs an Object with the following information to build Class.
//
// networkInfo: {
// hosts: <array> list of masternode hostname/ip urls,
// type: <string> "testnet", "mainnet" or "custom"
// },
constructor(networkInfoObj){
//Reject undefined or missing info
if (!validateTypes$2.isObjectWithKeys(networkInfoObj)) throw new Error(`Expected Network Info Object and got Type: ${typeof networkInfoObj}`)
if (!validateTypes$2.isArrayWithValues(networkInfoObj.hosts)) throw new Error(`HOSTS Required (Type: Array)`)
this.type = validateTypes$2.isStringWithValue(networkInfoObj.type) ? networkInfoObj.type.toLowerCase() : "custom";
this.events = new EventEmitter();
this.hosts = this.validateHosts(networkInfoObj.hosts);
this.currencySymbol = validateTypes$2.isStringWithValue(networkInfoObj.currencySymbol) ? networkInfoObj.currencySymbol : 'TAU';
this.name = validateTypes$2.isStringWithValue(networkInfoObj.name) ? networkInfoObj.name : 'lamden network';
this.lamden = validateTypes$2.isBoolean(networkInfoObj.lamden) ? networkInfoObj.lamden : false;
this.blockExplorer = validateTypes$2.isStringWithValue(networkInfoObj.blockExplorer) ? networkInfoObj.blockExplorer : undefined;
this.online = false;
try{
this.API = new LamdenMasterNode_API(networkInfoObj);
} catch (e) {
throw new Error(e)
}
}
//This will throw an error if the protocol wasn't included in the host string
vaidateProtocol(host){
let protocols = ['https://', 'http://'];
if (protocols.map(protocol => host.includes(protocol)).includes(true)) return host
throw new Error('Host String must include http:// or https://')
}
validateHosts(hosts){
return hosts.map(host => this.vaidateProtocol(host.toLowerCase()))
}
//Check if the network is online
//Emits boolean as 'online' event
//Also returns status as well as passes status to a callback
async ping(callback = undefined){
this.online = await this.API.pingServer();
this.events.emit('online', this.online);
if (validateTypes$2.isFunction(callback)) callback(this.online);
return this.online
}
get host() {return this.hosts[Math.floor(Math.random() * this.hosts.length)]}
get url() {return this.host}
getNetworkInfo(){
return {
name: this.name,
lamden: this.lamden,
type: this.type,
hosts: this.hosts,
url: this.url,
online: this.online,
}
}
}
const { validateTypes: validateTypes$3 } = validators;
class TransactionBuilder extends Network {
// Constructor needs an Object with the following information to build Class.
//
// arg[0] (networkInfo): { //Can also accpet a Lamden "Network Class"
// host: <string> masternode webserver hostname/ip,
// type: <string> "testnet", "mainnet" or "mockchain"
// }
// arg[1] (txInfo): {
// uid: [Optional] <string> unique ID for tracking purposes,
// senderVk: <hex string> public key of the transaction sender,
// contractName: <string> name of lamden smart contract,
// methodName: <string> name of method to call in contractName,
// kwargs: <object> key/values of args to pass to methodName
// example: kwargs.to = "270add00fc708791c97aeb5255107c770434bd2ab71c2e103fbee75e202aa15e"
// kwargs.amount = 1000
// stampLimit: <integer> the max amount of stamps the tx should use. tx could use less. if tx needs more the tx will fail.
// nonce: [Optional] <integer> send() will attempt to retrieve this info automatically
// processor [Optional] <string> send() will attempt to retrieve this info automatically
// }
// arg[2] (txData): [Optional] state hydrating data
constructor(networkInfo, txInfo, txData) {
if (validateTypes$3.isSpecificClass(networkInfo, 'Network'))
super(networkInfo.getNetworkInfo());
else super(networkInfo);
//Validate arguments
if(!validateTypes$3.isObjectWithKeys(txInfo)) throw new Error(`txInfo object not found`)
if(!validateTypes$3.isStringHex(txInfo.senderVk)) throw new Error(`Sender Public Key Required (Type: Hex String)`)
if(!validateTypes$3.isStringWithValue(txInfo.contractName)) throw new Error(`Contract Name Required (Type: String)`)
if(!validateTypes$3.isStringWithValue(txInfo.methodName)) throw new Error(`Method Required (Type: String)`)
if(!validateTypes$3.isInteger(txInfo.stampLimit)) throw new Error(`Stamps Limit Required (Type: Integer)`)
//Store variables in self for reference
this.uid = validateTypes$3.isStringWithValue(txInfo.uid) ? txInfo.uid : undefined;
this.sender = txInfo.senderVk;
this.contract = txInfo.contractName;
this.method = txInfo.methodName;
this.kwargs = {};
if(validateTypes$3.isObject(txInfo.kwargs)) this.kwargs = txInfo.kwargs;
this.stampLimit = txInfo.stampLimit;
//validate and set nonce and processor if user provided them
if (typeof txInfo.nonce !== 'undefined'){
if(!validateTypes$3.isInteger(txInfo.nonce)) throw new Error(`arg[6] Nonce is required to be an Integer, type ${typeof txInfo.none} was given`)
this.nonce = txInfo.nonce;
}
if (typeof txInfo.processor !== 'undefined'){
if(!validateTypes$3.isStringWithValue(txInfo.processor)) throw new Error(`arg[7] Processor is required to be a String, type ${typeof txInfo.processor} was given`)
this.processor = txInfo.processor;
}
this.signature;
this.transactionSigned = false;
//Transaction result information
this.nonceResult = {};
this.txSendResult = {errors:[]};
this.txBlockResult = {};
this.txHash;
this.txCheckResult = {};
this.txCheckAttempts = 0;
this.txCheckLimit = 10;
//Hydrate other items if passed
if (txData){
if (txData.uid) this.uid = txData.uid;
if (validateTypes$3.isObjectWithKeys(txData.txSendResult)) this.txSendResult = txData.txSendResult;
if (validateTypes$3.isObjectWithKeys(txData.nonceResult)){
this.nonceResult = txData.nonceResult;
if (validateTypes$3.isInteger(this.nonceResult.nonce)) this.nonce = this.nonceResult.nonce;
if (validateTypes$3.isStringWithValue(this.nonceResult.processor)) this.processor = this.nonceResult.processor;
}
if (validateTypes$3.isObjectWithKeys(txData.txSendResult)){
this.txSendResult = txData.txSendResult;
if (this.txSendResult.hash) this.txHash = this.txSendResult.hash;
}
if (validateTypes$3.isObjectWithKeys(txData.txBlockResult)) this.txBlockResult = txData.txBlockResult;
if (validateTypes$3.isObjectWithKeys(txData.resultInfo)) this.resultInfo = txData.resultInfo;
}
//Create Capnp messages and transactionMessages
this.makePayload();
}
makePayload(){
this.payload = {
contract: this.contract,
function: this.method,
kwargs: this.kwargs,
nonce: this.nonce,
processor: this.processor,
sender: this.sender,
stamps_supplied: this.stampLimit
};
this.sortedPayload = this.sortObject(this.payload);
}
makeTransaction(){
this.tx = {
metadata: {
signature: this.signature,
timestamp: parseInt(+new Date / 1000),
},
payload: this.sortedPayload.orderedObj
};
}
verifySignature(){
//Verify the signature is correct
if (!this.transactionSigned) throw new Error('Transaction has not be been signed. Use the sign(<private key>) method first.')
const stringBuffer = Buffer.from(this.sortedPayload.json);
const stringArray = new Uint8Array(stringBuffer);
return verify(this.sender, stringArray, this.signature)
}
sign(sk = undefined, userWallet = undefined){
const stringBuffer = Buffer.from(this.sortedPayload.json);
const stringArray = new Uint8Array(stringBuffer);
if (userWallet) this.signature = userWallet.sign(stringArray);
else this.signature = sign(sk, stringArray);
this.transactionSigned = true;
}
sortObject(object){
const processObj = (obj) => {
const getType = (value) => {
return Object.prototype.toString.call(value)
};
const isArray = (value) => {
if(getType(value) === "[object Array]") return true;
return false;
};
const isObject = (value) => {
if(getType(value) === "[object Object]") return true;
return false;
};
const sortObjKeys = (unsorted) => {
const sorted = {};
Object.keys(unsorted).sort().forEach(key => sorted[key] = unsorted[key]);
return sorted
};
const formatKeys = (unformatted) => {
Object.keys(unformatted).forEach(key => {
if (isArray(unformatted[key])) unformatted[key] = unformatted[key].map(item => {
if (isObject(item)) return formatKeys(item)
return item
});
if (isObject(unformatted[key])) unformatted[key] = formatKeys(unformatted[key]);
});
return sortObjKeys(unformatted)
};
if (!isObject(obj)) throw new TypeError('Not a valid Object')
try{
obj = JSON.parse(JSON.stringify(obj));
} catch (e) {
throw new TypeError('Not a valid JSON Object')
}
return formatKeys(obj)
};
const orderedObj = processObj(object);
return {
orderedObj,
json: JSON.stringify(orderedObj)
}
}
async getNonce(callback = undefined) {
let timestamp = new Date().toUTCString();
this.nonceResult = await this.API.getNonce(this.sender);
if (typeof this.nonceResult.nonce === 'undefined'){
throw new Error(this.nonceResult)
}
this.nonceResult.timestamp = timestamp;
this.nonce = this.nonceResult.nonce;
this.processor = this.nonceResult.processor;
this.nonceMasternode = this.nonceResult.masternode;
//Create payload object
this.makePayload();
if (!callback) return this.nonceResult;
return callback(this.nonceResult)
}
async send(sk = undefined, masternode = undefined, callback = undefined) {
//Error if transaction is not signed and no sk provided to the send method to sign it before sending
if (!validateTypes$3.isStringWithValue(sk) && !this.transactionSigned){
throw new Error(`Transation Not Signed: Private key needed or call sign(<private key>) first`);
}
let timestamp = new Date().toUTCString();
try{
//If the nonce isn't set attempt to get it
if (isNaN(this.nonce) || !validateTypes$3.isStringWithValue(this.processor)) await this.getNonce();
//if the sk is provided then sign the transaction
if (validateTypes$3.isStringWithValue(sk)) this.sign(sk);
//Serialize transaction
this.makeTransaction();
//Send transaction to the masternode
let masternodeURL = masternode;
if (!masternodeURL && this.nonceMasternode) masternodeURL = this.nonceMasternode;
let response = await this.API.sendTransaction(this.tx, masternodeURL);
//Set error if txSendResult doesn't exist
if (!response || validateTypes$3.isStringWithValue(response)){
this.txSendResult.errors = [response || "Unknown Transaction Error"];
}else{
if (response.error) this.txSendResult.errors = [response.error];
else this.txSendResult = response;
}
} catch (e){
this.txSendResult.errors = [e.message];
}
this.txSendResult.timestamp = timestamp;
return this.handleMasterNodeResponse(this.txSendResult, callback)
}
checkForTransactionResult(callback = undefined){
return new Promise((resolve) => {
let timerId = setTimeout(async function checkTx() {
this.txCheckAttempts = this.txCheckAttempts + 1;
let res = await this.API.checkTransaction(this.txHash);
let checkAgain = false;
let timestamp = new Date().toUTCString();
if (typeof res === 'string' || !res) {
if (this.txCheckAttempts < this.txCheckLimit){
checkAgain = true;
}else{
this.txCheckResult.errors = [
`Retry Attmpts ${this.txCheckAttempts} hit while checking for Tx Result.`,
res
];
}
}else{
if (res.error){
if (res.error === 'Transaction not found.'){
if (this.txCheckAttempts < this.txCheckLimit){
checkAgain = true;
}else{
this.txCheckResult.errors = [res.error, `Retry Attmpts ${this.txCheckAttempts} hit while checking for Tx Result.`];
}
}else{
this.txCheckResult.errors = [res.error];
}
}else{
this.txCheckResult = res;
}
}
if (checkAgain) timerId = setTimeout(checkTx.bind(this), 1000);
else{
if (validateTypes$3.isNumber(this.txCheckResult.status)){
if (this.txCheckResult.status > 0){
if (!validateTypes$3.isArray(this.txCheckResult.errors)) this.txCheckResult.errors = [];
this.txCheckResult.errors.push('This transaction returned a non-zero status code');
}
}
this.txCheckResult.timestamp = timestamp;
clearTimeout(timerId);
resolve(this.handleMasterNodeResponse(this.txCheckResult, callback));
}
}.bind(this), 1000);
})
}
handleMasterNodeResponse(result, callback = undefined){
//Check to see if this is a successful transacation submission
if (validateTypes$3.isStringWithValue(result.hash) && validateTypes$3.isStringWithValue(result.success)){
this.txHash = result.hash;
this.setPendingBlockInfo();
}else{
this.setBlockResultInfo(result);
this.txBlockResult = result;
}
this.events.emit('response', result, this.resultInfo.subtitle);
if (validateTypes$3.isFunction(callback)) callback(result);
return result
}
setPendingBlockInfo(){
this.resultInfo = {
title: 'Transaction Pending',
subtitle: 'Your transaction was submitted and is being processed',
message: `Tx Hash: ${this.txHash}`,
type: 'success',
};
return this.resultInfo;
}
setBlockResultInfo(result){
let erroredTx = false;
let errorText = `returned an error and `;
let statusCode = validateTypes$3.isNumber(result.status) ? result.status : undefined;
let stamps = (result.stampsUsed || result.stamps_used) || 0;
let message = '';
if(validateTypes$3.isArrayWithValues(result.errors)){
erroredTx = true;
message = `This transaction returned ${result.errors.length} errors.`;
if (result.result){
if (result.result.includes('AssertionError')) result.errors.push(result.result);
}
}
if (statusCode && erroredTx) errorText = `returned status code ${statusCode} and `;
this.resultInfo = {
title: `Transaction ${erroredTx ? 'Failed' : 'Successful'}`,
subtitle: `Your transaction ${erroredTx ? `${errorText} ` : ''}used ${stamps} stamps`,
message,
type: `${erroredTx ? 'error' : 'success'}`,
errorInfo: erroredTx ? result.errors : undefined,
returnResult: result.result || "",
stampsUsed: stamps,
statusCode
};
return this.resultInfo;
}
getResultInfo(){
return this.resultInfo;
}
getTxInfo(){
return {
senderVk: this.sender,
contractName: this.contract,
methodName: this.method,
kwargs: this.kwargs,
stampLimit: this.stampLimit
}
}
getAllInfo(){
return {
uid: this.uid,
txHash: this.txHash,
signed: this.transactionSigned,
tx: this.tx,
signature: this.signature,
networkInfo: this.getNetworkInfo(),
txInfo: this.getTxInfo(),
txSendResult: this.txSendResult,
txBlockResult: this.txBlockResult,
resultInfo: this.getResultInfo(),
nonceResult: this.nonceResult
}
}
}
const { validateTypes: validateTypes$4 } = validators;
class TransactionBatcher extends Network {
constructor(networkInfo) {
if (validateTypes$4.isSpecificClass(networkInfo, 'Network'))
super(networkInfo.getNetworkInfo());
else super(networkInfo);
this.txBatches = {};
this.overflow = [];
this.nonceResults = {};
this.running = false;
}
addTransaction(txInfo){
if (this.running) {
this.overflow.push(txInfo);
return
}
this.validateTransactionInfo(txInfo);
if (!this.txBatches[txInfo.senderVk]) this.txBatches[txInfo.senderVk] = [];
this.txBatches[txInfo.senderVk].push(txInfo);
}
addTransactionList(txList){
txList.forEach(txInfo => this.addTransaction(txInfo));
}
processOverflow(){
const overflow = this.overflow;
this.overflow = [];
overflow.forEach(txInfo => this.addTransaction(txInfo));
}
hasTransactions(){
let test = Object.keys(this.txBatches).map(senderVk => this.txBatches[senderVk].length);
test.filter(f => f === 0);
if (test.length > 0 ) return true
return false
}
validateTransactionInfo(txInfo){
try{
new TransactionBuilder(txInfo);
}catch(e){
return false
}
return true
}
async getStartingNonce(senderVk, callback = undefined){
let timestamp = new Date().toUTCString();
let response = await this.API.getNonce(senderVk);
if (typeof response.nonce === 'undefined'){
throw new Error(response)
}
response.timestamp = timestamp;
this.nonceResults[senderVk] = response;
if (callback) callback(response);
return response;
}
async sendAllBatches(keyDict){
if (this.running) return
let sentTransactions = [];
this.running = true;
await Promise.all(Object.keys(this.txBatches).map((senderVk) => {
const senderBatch = this.txBatches[senderVk].splice(0,15);
if (senderBatch.length <= 15) delete this.txBatches[senderVk];
return new Promise(async (resolver) => {
if (senderBatch.length === 0 ) resolver();
if (!keyDict[senderVk]) throw new Error(`Cannot sign batch for ${senderVk}. No signing key provided.`)
let nonceResponse = await this.getStartingNonce(senderVk);
let txBatch = this.setBatchNonces(nonceResponse, senderBatch);
this.signBatch(txBatch, keyDict[senderVk]);
this.sendBatch(txBatch).then(sentList => {
sentTransactions = [...sentTransactions, ...sentList];
resolver();
});
})
}));
try{
return Promise.all(sentTransactions)
}catch (e){}
finally{
this.running = false;
this.processOverflow();
}
}
setBatchNonces(nonceResult, txList){
return txList.map((txInfo, index) => {
txInfo.nonce = nonceResult.nonce + index;
txInfo.processor = nonceResult.processor;
return new TransactionBuilder({hosts: [nonceResult.masternode]}, txInfo)
}).sort((a, b) => a.nonce - b.nonce)
}
signBatch(txBatch, key){
txBatch.forEach(txBuilder => txBuilder.sign(key));
}
sendBatch(txBatch){
let resolvedTransactions = [];
return new Promise(resolver => {
const resolve = (index) => {
if ((index + 1) === txBatch.length) resolver(resolvedTransactions);
};
txBatch.forEach((txBuilder, index) => {
const delayedSend = () => {
resolvedTransactions[index] = txBuilder.send().then(() => {return txBuilder});
resolve(index);
};
setTimeout(delayedSend, 1200 * index);
});
})
}
}
const { validateTypes: validateTypes$5, assertTypes: assertTypes$1 } = validators;
class Keystore {
/**
* Lamden Keystores
*
* This Class will create a lamden keystore instance
*
* @param {Object|undefined} arg constructor argument
* @param {String|undefined} arg.key Create an instance and load it with one private key
* @param {String|undefined} arg.keyList Create an instance and load it with an array of private keys
* @param {String|undefined} arg.keystoreData Create an instance from an existing keystore file data
* @return {Keystore}
*/
constructor(arg = undefined) {
this.KEYSTORE_VERSION = "1.0";
this.password = null;
this.encryptedData = null;
this.keyList = (() => {
let keyList = [];
let outerClass = this;
let wallets = [];
const addKey = (key) => {
keyList.push(key);
createWallets();
};
const deleteKey = (position) => {
keyList.splice(position, 1);
createWallets();
};
const clearKeys = () => {
keyList = [];
createWallets();
};
const numOfKeys = () => keyList.length;
const createWallets = () => {
wallets = [];
keyList.forEach(keyInfo => {
let newWallet = create_wallet({sk: keyInfo.sk, keepPrivate: true});
newWallet = {...newWallet, ...keyInfo};
delete newWallet.sk;
wallets.push(newWallet);
});
};
const createKeystore = (password, hint = undefined) => {
return JSON.stringify({
data: encryptObject(password, {version: outerClass.KEYSTORE_VERSION, keyList}),
w: !hint ? "" : encryptStrHash('n1ahcKc0lb', hint),
});
};
const decryptKeystore = (password, data) => {
let decrypted = decryptObject(password, data);
if (decrypted) {
assertTypes$1.isArray(decrypted.keyList);
decrypted.keyList.forEach(keyInfo => assertTypes$1.isStringWithValue(keyInfo.sk));
decrypted.keyList.forEach(keyInfo => addKey(keyInfo));
outerClass.version = decrypted.version;
} else {
throw new Error("Incorrect Keystore Password.")
}
};
return {
getWallets: () => wallets,
getWallet: (vk) => wallets.find(wallet => wallet.vk === vk),
addKey,
clearKeys,
numOfKeys,
deleteKey,
createKeystore,
decryptKeystore
}
})();
if (arg){
if (arg.key) this.addKey(arg.key);
if (arg.keyList) this.addKeys(arg.keyList);
if (arg.keystoreData) this.addKeystoreData(arg.keystoreData);
}
}
/**
* Add a list of keys to add to the keystore
* @param {Array.<String>} keyList An array of 32 character long Lamden private keys
*/
addKeys(keyList){
assertTypes$1.isArray(keyList);
keyList.forEach(key => this.addKey(key));
}
/**
* Add a key to the keystore
* @param {string} key A 32 character long Lamden private key
*/
addKey(keyInfo){
assertTypes$1.isObjectWithKeys(keyInfo);
assertTypes$1.isStringWithValue(keyInfo.sk);
if (validateTypes$5.isStringWithValue(keyInfo.vk)) delete keyInfo.vk;
this.keyList.addKey(keyInfo);
}
/**
* Load the keystore with the data from an existing keystore
* @param {string} keystoreData The contents of an existing encrypted keystore file
*/
addKeystoreData(keystoreData){
if (validateTypes$5.isString(keystoreData)) keystoreData = JSON.parse(keystoreData);
if(this.validateKeyStore(keystoreData)){
this.encryptedData = keystoreData;
}
}
/**
* Returns the password hint in a keystore file
* @param {String|undefined} keystoreData The contents of an existing encrypted keystore file if one wasn't supplied to the constructor
*/
getPasswordHint(keystoreData = undefined){
if (!this.encryptedData && !keystoreData) throw new Error("No keystore data found.")
if (keystoreData) {
if (validateTypes$5.isString(keystoreData)) keystoreData = JSON.parse(keystoreData);
}
else keystoreData = this.encryptedData;
if (keystoreData.w) return decryptStrHash('n1ahcKc0lb', keystoreData.w);
else return ""
}
/**
* Removes a specific key from the keyList
* @param {Number} keyIndex The index of the key you want to remove
*/
deleteKey(keyIndex){
assertTypes$1.isInteger(keyIndex);
if (this.keyList.numOfKeys() === 0) return
if (keyIndex < 0 || keyIndex >= this.keyList.numOfKeys()) throw new Error("Key index out of range.")
this.keyList.deleteKey(keyIndex);
}
/**
* Clears all keys from the keystore
*/
clearKeys(){
this.keyList.clearKeys();
}
/**
* Clears all keys from the keystore
* @return {Array.<Object>} An array of wallet objects
*/
get wallets() {
return this.keyList.getWallets()
}
/**
* Load the keystore with the data from an existing keystore
* @param {String} vk A 32 character long Lamden public key
* @return {Object} A wallet object
*/
getWallet(vk) {
return this.keyList.getWallet(vk)
}
/**
* Used to validate that a keystore is the proper Lamden Format (does not decrypt data)
* @param {String} keystoreData The contents of an existing encrypted keystore file
* @return {Boolean} valid
* @throws {Error} This is not a valid keystore file.
*/
validateKeyStore(keystoreData){
assertTypes$1.isObjectWithKeys(keystoreData);
try{
let encryptedData = JSON.parse(keystoreData.data);
if (!encryptedData.ct || !encryptedData.iv || !encryptedData.s){
throw new Error("This is not a valid keystore file.")
}
} catch (e) {
throw new Error("This is not a valid keystore file.")
}
return true;
}
/**
* Create a Keystore text string from the keys contained in the Keystore instance
* @param {String} password A password to encrypt the data
* @param {String|undefined} hint An optional password hint. Not stored in clear text (obsured) but not encrypted with the password.
* @return {String} A JSON stringified object containing the encrypted data
* @throws {Error} Any errors from the encyption process
*/
createKeystore(password, hint = undefined) {
assertTypes$1.isStringWithValue(password);
if (hint){
assertTypes$1.isStringWithValue(hint);
}
return this.keyList.createKeystore(password, hint)
}
/**
* Decrypt a keystore into a useable array of wallets. Any decrypted keys will be added to existing keys in the keystore.
* @param {String} password A password to encrypt the data
* @param {String|undefined} keystoreData The encrypted contents from a keystore file if not passed into the constructor.
* @throws {Error} Any errors from the encyption process
*/
decryptKeystore(password, keystoreData = undefined){
if (keystoreData) this.addKeystoreData(keystoreData);
if (!this.encryptedData) throw new Error ("No keystoreData to decrypt.")
try{
this.keyList.decryptKeystore(password, this.encryptedData.data);
}catch (e){
throw new Error("Incorrect Keystore Password.")
}
}
}
var index = {
TransactionBuilder,
TransactionBatcher,
Masternode_API: LamdenMasterNode_API,
Network,
wallet,
Keystore,
Encoder: encoder_1,
utils
};
module.exports = index;
| 30.420561 | 192 | 0.544522 |
83b081d71dad3b613837d2b9039799aab7899330 | 154 | js | JavaScript | Doc/html/dir_bce4fe468017adc58bf81882531ea016.js | dani007200964/STM32-Class-Factory | ff50f6502ac7dd44e7c489b34c3bff6f41b5727f | [
"MIT"
] | null | null | null | Doc/html/dir_bce4fe468017adc58bf81882531ea016.js | dani007200964/STM32-Class-Factory | ff50f6502ac7dd44e7c489b34c3bff6f41b5727f | [
"MIT"
] | null | null | null | Doc/html/dir_bce4fe468017adc58bf81882531ea016.js | dani007200964/STM32-Class-Factory | ff50f6502ac7dd44e7c489b34c3bff6f41b5727f | [
"MIT"
] | null | null | null | var dir_bce4fe468017adc58bf81882531ea016 =
[
[ "Serial.cpp", "_serial_8cpp.html", null ],
[ "Serial.hpp", "_serial_8hpp.html", "_serial_8hpp" ]
]; | 30.8 | 57 | 0.681818 |
83b0828b0323aff18f2cbb180315cf3e679e01e2 | 427 | js | JavaScript | public/js/post.js | abrown0926/Tech-Blog-Anthony-Brown-WK14 | ea276b7ba4ae2ceaf54dce70a9de069d8143e6f6 | [
"ADSL"
] | null | null | null | public/js/post.js | abrown0926/Tech-Blog-Anthony-Brown-WK14 | ea276b7ba4ae2ceaf54dce70a9de069d8143e6f6 | [
"ADSL"
] | null | null | null | public/js/post.js | abrown0926/Tech-Blog-Anthony-Brown-WK14 | ea276b7ba4ae2ceaf54dce70a9de069d8143e6f6 | [
"ADSL"
] | null | null | null | const handleDeletePost = async (event) => {
event.preventDefault();
const id = document
.querySelector("[data-postID]")
.getAttribute("data-postID");
const response = await fetch(`/api/post/${id}`, {
method: "DELETE",
});
if (response.ok) {
document.location.replace("/");
alert("Post deleted!");
}
};
document
.querySelector("#deletePost")
.addEventListener("click", handleDeletePost);
| 20.333333 | 51 | 0.639344 |
83b0be41609d86f4fe28641b56cb81b5e56cb7a0 | 264 | js | JavaScript | Frontend/node_modules/polished/lib/internalHelpers/_guard.js | mvdhoek/DSB-ReSeT | 746aa92cab795011494e09f4c27c5c2e673ba82c | [
"MIT"
] | 12 | 2019-03-07T00:40:51.000Z | 2020-06-25T19:29:35.000Z | Frontend/node_modules/polished/lib/internalHelpers/_guard.js | mvdhoek/DSB-ReSeT | 746aa92cab795011494e09f4c27c5c2e673ba82c | [
"MIT"
] | 6 | 2020-04-27T01:12:36.000Z | 2022-02-26T03:04:33.000Z | Frontend/node_modules/polished/lib/internalHelpers/_guard.js | mvdhoek/DSB-ReSeT | 746aa92cab795011494e09f4c27c5c2e673ba82c | [
"MIT"
] | 7 | 2019-08-14T00:15:13.000Z | 2020-11-16T19:31:34.000Z | "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function guard(lowerBoundary, upperBoundary, value) {
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
}
exports.default = guard;
module.exports = exports["default"]; | 24 | 65 | 0.742424 |
83b0bf8314457a45e959908c71ddefe3593b3799 | 3,290 | js | JavaScript | flask_server/static/js/10.59630f9d9f74443b37ef.js | hjlarry/flask-vue-cms | 86b929b4f6a1c09c8cd13741964a783ee3755d5d | [
"MIT"
] | 46 | 2018-03-09T05:24:31.000Z | 2022-01-19T09:42:02.000Z | flask_server/static/js/10.59630f9d9f74443b37ef.js | hjlarry/flask-vue-cms | 86b929b4f6a1c09c8cd13741964a783ee3755d5d | [
"MIT"
] | 8 | 2019-01-22T13:52:45.000Z | 2020-07-23T08:57:37.000Z | flask_server/static/js/10.59630f9d9f74443b37ef.js | hjlarry/flask-vue-cms | 86b929b4f6a1c09c8cd13741964a783ee3755d5d | [
"MIT"
] | 17 | 2018-05-03T07:53:22.000Z | 2022-01-23T09:12:25.000Z | webpackJsonp([10],{md3T:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("vMJZ"),i={data:function(){return{list:null,total:null,listLoading:!0,listQuery:{page:1,limit:10}}},created:function(){this.getList()},methods:{getList:function(){var t=this;this.listLoading=!0,Object(a.d)(this.listQuery).then(function(e){t.list=e.data.items,t.total=e.data.total,t.listLoading=!1;for(var n=0;n<t.list.length;n++)t.list[n].avatar&&(t.list[n].avatar=""+t.list[n].avatar)})},handleSizeChange:function(t){this.listQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.listQuery.page=t,this.getList()},handleUpdate:function(t){this.$router.push({path:"/user/edit",query:{id:t.id}})},handleDelete:function(t){var e=this,n=this.list.indexOf(t),i=this.$confirm("确定移除"+t.username+"?"),l={id:t.id};i.then(function(){Object(a.b)(l).then(function(){e.$notify({title:"成功",message:"删除成功",type:"success",duration:2e3}),e.list.splice(n,1)})}).catch(function(){e.$notify({title:"失败",message:"删除失败",type:"fail",duration:2e3})})}}},l={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("div",{staticClass:"filter-container"}),t._v(" "),n("el-table",{directives:[{name:"loading",rawName:"v-loading.body",value:t.listLoading,expression:"listLoading",modifiers:{body:!0}}],attrs:{data:t.list,"element-loading-text":"Loading",border:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{align:"center",label:"ID",width:"95"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.id)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"username",width:"95",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.username))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"姓名",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.name)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"头像",width:"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("img",{attrs:{src:t.row.avatar,alt:"",width:"100",height:"100"}})]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"created_at",label:"更新时间",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.updated_at?n("i",{staticClass:"el-icon-time"}):t._e(),t._v(" "),n("span",[t._v(t._s(e.row.updated_at))])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作",width:"200","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(n){t.handleUpdate(e.row)}}},[t._v("编辑")]),t._v(" "),n("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(n){t.handleDelete(e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),n("div",{staticClass:"pagination-container"},[n("el-pagination",{attrs:{background:"","current-page":t.listQuery.page,"page-sizes":[5,10,20,30,50],"page-size":t.listQuery.limit,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},staticRenderFns:[]},s=n("VU/8")(i,l,!1,null,null,null);e.default=s.exports}}); | 3,290 | 3,290 | 0.67234 |
83b14b591f6f643941e6ecf909cee6d7624e0870 | 2,983 | js | JavaScript | docs/generated/oxygen-webhelp/app/nav-links/json/concept_jjk_23z_sq-d46e172726.js | pujiaolin/datacollector | 5ba9d532f5d89c7b98c6f22a7255d5a7b52f0e0a | [
"Apache-2.0"
] | 1 | 2021-01-03T15:35:20.000Z | 2021-01-03T15:35:20.000Z | docs/generated/oxygen-webhelp/app/nav-links/json/concept_jjk_23z_sq-d46e172726.js | pujiaolin/datacollector | 5ba9d532f5d89c7b98c6f22a7255d5a7b52f0e0a | [
"Apache-2.0"
] | null | null | null | docs/generated/oxygen-webhelp/app/nav-links/json/concept_jjk_23z_sq-d46e172726.js | pujiaolin/datacollector | 5ba9d532f5d89c7b98c6f22a7255d5a7b52f0e0a | [
"Apache-2.0"
] | 2 | 2021-07-20T09:06:22.000Z | 2022-03-07T02:17:25.000Z | define({"topics" : [{"title":"Data Preview Overview","href":"datacollector\/UserGuide\/Data_Preview\/DataPreview_Title.html#concept_jtn_s3m_lq","attributes": {"data-id":"concept_jtn_s3m_lq",},"menu": {"hasChildren":true,},"tocID":"concept_jtn_s3m_lq-d46e172859","next":"concept_jtn_s3m_lq-d46e172859",},{"title":"Data Collector UI - Preview Mode","shortdesc":"\n <p class=\"shortdesc\">You can use <span class=\"ph\">Data Collector</span> to view how data passes through the pipeline.\n </p>\n ","href":"datacollector\/UserGuide\/Data_Preview\/DataPreview_Title.html#concept_l4q_pbl_sq","attributes": {"data-id":"concept_l4q_pbl_sq",},"menu": {"hasChildren":false,},"tocID":"concept_l4q_pbl_sq-d46e173075","topics":[]},{"title":"Preview Codes","shortdesc":"\n <p class=\"shortdesc\">Data preview displays different colors for different types of data. Preview also uses other codes and formatting to highlight\n changed fields.\n </p>\n ","href":"datacollector\/UserGuide\/Data_Preview\/DataPreview_Title.html#concept_qqc_s3h_tq","attributes": {"data-id":"concept_qqc_s3h_tq",},"menu": {"hasChildren":false,},"tocID":"concept_qqc_s3h_tq-d46e173154","topics":[]},{"title":"Previewing a Single Stage","href":"datacollector\/UserGuide\/Data_Preview\/DataPreview_Title.html#task_cxd_p25_qq","attributes": {"data-id":"task_cxd_p25_qq",},"menu": {"hasChildren":false,},"tocID":"task_cxd_p25_qq-d46e173240","topics":[]},{"title":"Previewing Multiple Stages","shortdesc":"\n <p class=\"shortdesc\">You can preview data for a group of linked stages within a pipeline.</p>\n ","href":"datacollector\/UserGuide\/Data_Preview\/DataPreview_Title.html#task_svd_dvz_sq","attributes": {"data-id":"task_svd_dvz_sq",},"menu": {"hasChildren":false,},"tocID":"task_svd_dvz_sq-d46e173333","topics":[]},{"title":"Editing Preview Data","shortdesc":"\n <p class=\"shortdesc\">You can edit preview data to view how a stage or group of stages processes the changed data. Edit preview data to\n test for data conditions that might not appear in the preview data set.\n </p>\n ","href":"datacollector\/UserGuide\/Data_Preview\/DataPreview_Title.html#task_nyy_13l_5s","attributes": {"data-id":"task_nyy_13l_5s",},"menu": {"hasChildren":false,},"tocID":"task_nyy_13l_5s-d46e173439","topics":[]},{"title":"Editing Properties","shortdesc":"\n <p class=\"shortdesc\">In data preview, you can edit stage properties to see how the changes affect preview data. For example, you might\n edit the expression in an Expression Evaluator to see how the expression alters data. \n </p>\n ","href":"datacollector\/UserGuide\/Data_Preview\/DataPreview_Title.html#task_dyy_k3l_5s","attributes": {"data-id":"task_dyy_k3l_5s",},"menu": {"hasChildren":false,},"tocID":"task_dyy_k3l_5s-d46e173555","topics":[]}]}); | 2,983 | 2,983 | 0.692256 |
83b1ed59eb78f158356a27b79bc647eb56f77157 | 8,000 | js | JavaScript | test/tfs.js | yanmingsohu/nfs-cassandra-node | 820d81c3b280ec95a1a03686d39b6c9ca9e772d9 | [
"MIT"
] | null | null | null | test/tfs.js | yanmingsohu/nfs-cassandra-node | 820d81c3b280ec95a1a03686d39b6c9ca9e772d9 | [
"MIT"
] | null | null | null | test/tfs.js | yanmingsohu/nfs-cassandra-node | 820d81c3b280ec95a1a03686d39b6c9ca9e772d9 | [
"MIT"
] | null | null | null | module.exports = require('./test-base.js')(tfs_main);
function tfs_main(driver) {
var fs, hdid;
var hdfs = require('fs');
var gid_uid = parseInt(10 * Math.random()) + 1;
var mode = parseInt(0x777 * Math.random())+1;
var now = Date.now();
var dir2remove_a= false;
var append_buf = Math.random() > 0.5 ? '-' : '_';
var filecontent = new Buffer(4096*3 + 1);
try {
hdid = hdfs.readFileSync(__dirname + '/driver-id', {encoding:'UTF-8'});
hdid = hdid.trim();
} catch(e) {
throw new Error('Run "tdriver.js" first.');
}
for (var i=0,e=filecontent.length; i<e; ++i) {
filecontent[i] = parseInt(Math.random() * 255);
}
function arrhas(arr, item) {
for (var i=0,e=arr.length; i<e; ++i) {
if (arr[i] == item) return true;
}
return false;
}
return {
note : 'FS base',
open_fs: function(test) {
driver.open_fs(hdid, function(err, _fs) {
fs = _fs;
test.assert(err);
test.assert(_fs != null, 'cannot get fs');
test.finish();
});
},
watch1: function(test) {
test.wait('open_fs');
var w1 = fs.watch('/dir2', { recursive: true,
persistent:true }, function(type, fname) {
test.log(type, fname);
});
w1.on('error', function(err) {
test.assert(err);
});
var w2 = fs.watch('/dir1/need-delete', function(type, fname) {
test.log(type, fname);
});
test.finish();
},
mkdir1 : function(test) {
test.wait('open_fs', 'watch1');
fs.mkdir('/dir1', function(err) {
if (err && err.code != 'EEXIST') test.assert(err);
test.finish();
});
},
mkdir2 : function(test) {
test.wait('mkdir1')
fs.mkdir('/dir2', function(err) {
if (err && err.code != 'EEXIST') test.assert(err);
test.finish();
});
},
mkdir2a : function(test) {
test.wait('mkdir2')
fs.mkdir('/dir2/a', function(err) {
if (err && err.code != 'EEXIST') test.assert(err);
test.finish();
});
},
mkdir3 : function(test) {
test.wait('mkdir2')
fs.mkdir('/dir1/a', function(err) {
if (err && err.code != 'EEXIST') test.assert(err);
test.finish();
});
},
mkdir4 : function(test) {
test.wait('mkdir3');
fs.mkdir('/dir1/b', function(err) {
if (err && err.code != 'EEXIST') test.assert(err);
test.finish();
});
},
list1: function(test) {
test.wait('mkdir4');
fs.readdir('/', function(err, list) {
test.assert(err);
test.assert(arrhas(list, 'dir1'), list);
test.assert(arrhas(list, 'dir2'), list);
test.finish();
});
},
list2: function(test) {
test.wait('mkdir4');
fs.readdir('/dir1', function(err, list) {
test.assert(err);
test.assert(arrhas(list, 'a'), list);
test.assert(arrhas(list, 'b'), list);
test.finish();
});
},
list3: function(test) {
test.wait('mkdir2a');
fs.readdir('/dir2', function(err, list) {
test.assert(err);
if (dir2remove_a) {
list.forEach(function(f) {
test.assert(f != 'a', '/dir2/a not remove');
});
}
test.finish();
});
},
rm_dir_fail: function(test) {
test.wait('list2', 'mkdir2a');
fs.rmdir('/dir2', function(err) {
test.assert(err != null, '非空文件夹不应该被删除');
test.finish();
});
},
rm_dir: function(test) {
test.wait('list2', 'mkdir2a', 'rm_dir_fail');
fs.rmdir('/dir2/a', function(err) {
test.assert(err);
dir2remove_a = true;
test.retest('list3');
test.finish();
});
},
'update time': function(test) {
test.wait('mkdir1');
fs.utimes('/dir1', now, now, function(err) {
// test.log(now);
test.assert(err);
test.finish();
});
},
'change-owner': function(test) {
test.wait('mkdir1');
fs.chown('/dir1', gid_uid, gid_uid, function(err) {
// test.log(gid_uid);
test.assert(err);
test.finish();
});
},
'change-mode' : function(test) {
test.wait('mkdir1');
fs.chmod('/dir1', mode, function(err) {
// test.log(mode);
test.assert(err);
test.finish();
});
},
'link-state' : function(test) {
test.wait('mkdir1', 'update time', 'change-owner', 'change-mode');
fs.lstat('/dir1', function(err, stat) {
test.assert(err);
if (stat) {
test.assert(stat.atime.getTime() == now, 'atime not change');
test.assert(stat.mtime.getTime() == now, 'mtime not change');
test.assert(stat.mode == mode, 'mode not change');
test.assert(stat.gid == gid_uid, 'gid not change');
test.assert(stat.uid == gid_uid, 'uid not change');
//test.log('/dir1', stat);
}
test.finish();
});
},
'write-file': function(test) {
test.wait('mkdir2');
fs.writeFile('/dir2/t.txt', filecontent, function(err, size, buffer) {
test.assert(buffer != null, 'cannot get buffer:');
test.assert(size == buffer.length,
'cannot write file size: ' + size + '->' + buffer.length);
test.assert(err);
test.finish();
});
},
'mkdir-for-rename': function(test) {
test.wait('write-file');
fs.unlink('/rename-target/t.doc', function() {
fs.rmdir('/rename-target', function() {
fs.mkdir('/rename-target', function(err) {
//test.assert(err);
test.finish();
});
})
});
},
'rename' : function(test) {
test.wait('mkdir-for-rename');
fs.rename('/dir2/t.txt', '/rename-target/t.doc', function(err) {
test.assert(err);
test.finish();
});
},
'read-file': function(test) {
test.wait('rename');
fs.readFile('/rename-target/t.doc', function(err, buffer, size) {
if (!err) {
var showLen = 100;
test.assert(size == buffer.length, 'size fail1 ' + buffer.length);
test.assert(size == filecontent.length, 'size fail2 ' + filecontent.length);
for (var i=0; i<size; ++i) {
if (buffer[i] != filecontent[i]) {
test.assert(false, 'file content fail at ' + i + '['+size+']');
test.log('src:', filecontent.slice(i-showLen, i+showLen));
test.log('fs: ', buffer.slice(i-showLen, i+showLen));
break;
}
}
}
test.assert(err);
test.finish();
});
},
'append' : function(test) {
test.wait('mkdir2');
fs.appendFile('/dir2/append.txt', append_buf, function(err) {
test.assert(err);
test.finish();
});
},
'read-append' : function(test) {
test.wait('append');
fs.readFile('/dir2/append.txt', function(err, size, buffer) {
if (buffer) {
// test.log(size, buffer.slice(size-5, size).toString());
test.assert(buffer[buffer.length-1] == append_buf[0]);
}
test.assert(err);
test.finish();
});
},
'make-deled-txt' : function(test) {
test.wait('mkdir1');
fs.writeFile('/dir1/need-delete', 'delete', function(err, size, buffer) {
test.assert(err);
test.finish();
});
},
'remove-txt' : function(test) {
test.wait('make-deled-txt');
fs.unlink('/dir1/need-delete', function(err) {
test.assert(err);
test.finish();
});
},
quit: function(test) {
test.wait('change-mode', 'update time', 'list1', 'list2', 'read-append',
'rm_dir', 'change-owner', 'link-state', 'write-file', 'read-file',
'remove-txt', 'watch1');
fs.quit(function(err) {
test.finish();
});
},
};
}
| 25.07837 | 86 | 0.507125 |
83b1fe9482a84e6ec962879411b5212ec54958f6 | 18,783 | js | JavaScript | node_modules/@tensorflow/tfjs-core/dist/io/router_registry_test.js | osama294/doctorportal | fbbf71db1d679f699daabdef83e828555ce8a6fc | [
"MIT"
] | null | null | null | node_modules/@tensorflow/tfjs-core/dist/io/router_registry_test.js | osama294/doctorportal | fbbf71db1d679f699daabdef83e828555ce8a6fc | [
"MIT"
] | 6 | 2021-11-14T18:09:24.000Z | 2021-11-14T19:35:45.000Z | node_modules/@tensorflow/tfjs-core/dist/io/router_registry_test.js | osama294/doctorportal | fbbf71db1d679f699daabdef83e828555ce8a6fc | [
"MIT"
] | null | null | null | /**
* @license
* Copyright 2018 Google LLC. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =============================================================================
*/
import * as tf from '../index';
import { BROWSER_ENVS, describeWithFlags } from '../jasmine_util';
import { BrowserIndexedDB, browserIndexedDB } from './indexed_db';
import { BrowserLocalStorage, browserLocalStorage } from './local_storage';
import { IORouterRegistry } from './router_registry';
describeWithFlags('IORouterRegistry', BROWSER_ENVS, () => {
const localStorageRouter = (url) => {
const scheme = 'localstorage://';
if (url.startsWith(scheme)) {
return browserLocalStorage(url.slice(scheme.length));
}
else {
return null;
}
};
const indexedDBRouter = (url) => {
const scheme = 'indexeddb://';
if (url.startsWith(scheme)) {
return browserIndexedDB(url.slice(scheme.length));
}
else {
return null;
}
};
class FakeIOHandler {
constructor(url1, url2) { }
}
const fakeMultiStringRouter = (url) => {
const scheme = 'foo://';
if (Array.isArray(url) && url.length === 2) {
if (url[0].startsWith(scheme) && url[1].startsWith(scheme)) {
return new FakeIOHandler(url[0], url[1]);
}
else {
return null;
}
}
else {
return null;
}
};
let tempRegistryInstance = null;
beforeEach(() => {
// Force reset registry for testing.
// tslint:disable:no-any
tempRegistryInstance = IORouterRegistry.instance;
IORouterRegistry.instance = null;
// tslint:enable:no-any
});
afterEach(() => {
// tslint:disable-next-line:no-any
IORouterRegistry.instance = tempRegistryInstance;
});
it('getSaveHandler succeeds', () => {
IORouterRegistry.registerSaveRouter(localStorageRouter);
IORouterRegistry.registerSaveRouter(indexedDBRouter);
const out1 = tf.io.getSaveHandlers('localstorage://foo-model');
expect(out1.length).toEqual(1);
expect(out1[0] instanceof BrowserLocalStorage).toEqual(true);
const out2 = tf.io.getSaveHandlers('indexeddb://foo-model');
expect(out2.length).toEqual(1);
expect(out2[0] instanceof BrowserIndexedDB).toEqual(true);
});
it('getLoadHandler succeeds', () => {
IORouterRegistry.registerLoadRouter(localStorageRouter);
IORouterRegistry.registerLoadRouter(indexedDBRouter);
const out1 = tf.io.getLoadHandlers('localstorage://foo-model');
expect(out1.length).toEqual(1);
expect(out1[0] instanceof BrowserLocalStorage).toEqual(true);
const out2 = tf.io.getLoadHandlers('indexeddb://foo-model');
expect(out2.length).toEqual(1);
expect(out2[0] instanceof BrowserIndexedDB).toEqual(true);
});
it('getLoadHandler with string array argument succeeds', () => {
IORouterRegistry.registerLoadRouter(fakeMultiStringRouter);
const loadHandler = IORouterRegistry.getLoadHandlers(['foo:///123', 'foo:///456']);
expect(loadHandler[0] instanceof FakeIOHandler).toEqual(true);
expect(IORouterRegistry.getLoadHandlers([
'foo:///123', 'bar:///456'
])).toEqual([]);
expect(IORouterRegistry.getLoadHandlers(['foo:///123'])).toEqual([]);
expect(IORouterRegistry.getLoadHandlers('foo:///123')).toEqual([]);
});
it('getSaveHandler fails', () => {
IORouterRegistry.registerSaveRouter(localStorageRouter);
expect(tf.io.getSaveHandlers('invalidscheme://foo-model')).toEqual([]);
// Check there is no crosstalk between save and load handlers.
expect(tf.io.getLoadHandlers('localstorage://foo-model')).toEqual([]);
});
const fakeLoadOptionsRouter = (url, loadOptions) => {
return new FakeLoadOptionsHandler(url, loadOptions);
};
class FakeLoadOptionsHandler {
constructor(url, loadOptions) {
this.loadOptions = loadOptions;
}
get loadOptionsData() {
return this.loadOptions;
}
}
it('getLoadHandler loadOptions', () => {
IORouterRegistry.registerLoadRouter(fakeLoadOptionsRouter);
const loadOptions = {
onProgress: (fraction) => { },
fetchFunc: () => { }
};
const loadHandler = tf.io.getLoadHandlers('foo:///123', loadOptions);
expect(loadHandler.length).toEqual(1);
expect(loadHandler[0] instanceof FakeLoadOptionsHandler).toEqual(true);
// Check callback function passed to IOHandler
expect(loadHandler[0].loadOptionsData)
.toBe(loadOptions);
});
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyX3JlZ2lzdHJ5X3Rlc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi90ZmpzLWNvcmUvc3JjL2lvL3JvdXRlcl9yZWdpc3RyeV90ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7Ozs7R0FlRztBQUVILE9BQU8sS0FBSyxFQUFFLE1BQU0sVUFBVSxDQUFDO0FBQy9CLE9BQU8sRUFBQyxZQUFZLEVBQUUsaUJBQWlCLEVBQUMsTUFBTSxpQkFBaUIsQ0FBQztBQUVoRSxPQUFPLEVBQUMsZ0JBQWdCLEVBQUUsZ0JBQWdCLEVBQUMsTUFBTSxjQUFjLENBQUM7QUFDaEUsT0FBTyxFQUFDLG1CQUFtQixFQUFFLG1CQUFtQixFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFDekUsT0FBTyxFQUFDLGdCQUFnQixFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFHbkQsaUJBQWlCLENBQUMsa0JBQWtCLEVBQUUsWUFBWSxFQUFFLEdBQUcsRUFBRTtJQUN2RCxNQUFNLGtCQUFrQixHQUFHLENBQUMsR0FBVyxFQUFFLEVBQUU7UUFDekMsTUFBTSxNQUFNLEdBQUcsaUJBQWlCLENBQUM7UUFDakMsSUFBSSxHQUFHLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxFQUFFO1lBQzFCLE9BQU8sbUJBQW1CLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztTQUN0RDthQUFNO1lBQ0wsT0FBTyxJQUFJLENBQUM7U0FDYjtJQUNILENBQUMsQ0FBQztJQUVGLE1BQU0sZUFBZSxHQUFHLENBQUMsR0FBVyxFQUFFLEVBQUU7UUFDdEMsTUFBTSxNQUFNLEdBQUcsY0FBYyxDQUFDO1FBQzlCLElBQUksR0FBRyxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsRUFBRTtZQUMxQixPQUFPLGdCQUFnQixDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7U0FDbkQ7YUFBTTtZQUNMLE9BQU8sSUFBSSxDQUFDO1NBQ2I7SUFDSCxDQUFDLENBQUM7SUFFRixNQUFNLGFBQWE7UUFDakIsWUFBWSxJQUFZLEVBQUUsSUFBWSxJQUFHLENBQUM7S0FDM0M7SUFFRCxNQUFNLHFCQUFxQixHQUFHLENBQUMsR0FBb0IsRUFBRSxFQUFFO1FBQ3JELE1BQU0sTUFBTSxHQUFHLFFBQVEsQ0FBQztRQUN4QixJQUFJLEtBQUssQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLElBQUksR0FBRyxDQUFDLE1BQU0sS0FBSyxDQUFDLEVBQUU7WUFDMUMsSUFBSSxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLEVBQUU7Z0JBQzFELE9BQU8sSUFBSSxhQUFhLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO2FBQzFDO2lCQUFNO2dCQUNMLE9BQU8sSUFBSSxDQUFDO2FBQ2I7U0FDRjthQUFNO1lBQ0wsT0FBTyxJQUFJLENBQUM7U0FDYjtJQUNILENBQUMsQ0FBQztJQUVGLElBQUksb0JBQW9CLEdBQXFCLElBQUksQ0FBQztJQUNsRCxVQUFVLENBQUMsR0FBRyxFQUFFO1FBQ2Qsb0NBQW9DO1FBQ3BDLHdCQUF3QjtRQUN4QixvQkFBb0IsR0FBSSxnQkFBd0IsQ0FBQyxRQUFRLENBQUM7UUFDekQsZ0JBQXdCLENBQUMsUUFBUSxHQUFHLElBQUksQ0FBQztRQUMxQyx1QkFBdUI7SUFDekIsQ0FBQyxDQUFDLENBQUM7SUFFSCxTQUFTLENBQUMsR0FBRyxFQUFFO1FBQ2Isa0NBQWtDO1FBQ2pDLGdCQUF3QixDQUFDLFFBQVEsR0FBRyxvQkFBb0IsQ0FBQztJQUM1RCxDQUFDLENBQUMsQ0FBQztJQUVILEVBQUUsQ0FBQyx5QkFBeUIsRUFBRSxHQUFHLEVBQUU7UUFDakMsZ0JBQWdCLENBQUMsa0JBQWtCLENBQUMsa0JBQWtCLENBQUMsQ0FBQztRQUN4RCxnQkFBZ0IsQ0FBQyxrQkFBa0IsQ0FBQyxlQUFlLENBQUMsQ0FBQztRQUVyRCxNQUFNLElBQUksR0FBRyxFQUFFLENBQUMsRUFBRSxDQUFDLGVBQWUsQ0FBQywwQkFBMEIsQ0FBQyxDQUFDO1FBQy9ELE1BQU0sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQy9CLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLFlBQVksbUJBQW1CLENBQUMsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDN0QsTUFBTSxJQUFJLEdBQUcsRUFBRSxDQUFDLEVBQUUsQ0FBQyxlQUFlLENBQUMsdUJBQXVCLENBQUMsQ0FBQztRQUM1RCxNQUFNLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUMvQixNQUFNLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxZQUFZLGdCQUFnQixDQUFDLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQzVELENBQUMsQ0FBQyxDQUFDO0lBRUgsRUFBRSxDQUFDLHlCQUF5QixFQUFFLEdBQUcsRUFBRTtRQUNqQyxnQkFBZ0IsQ0FBQyxrQkFBa0IsQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO1FBQ3hELGdCQUFnQixDQUFDLGtCQUFrQixDQUFDLGVBQWUsQ0FBQyxDQUFDO1FBRXJELE1BQU0sSUFBSSxHQUFHLEVBQUUsQ0FBQyxFQUFFLENBQUMsZUFBZSxDQUFDLDBCQUEwQixDQUFDLENBQUM7UUFDL0QsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDL0IsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsWUFBWSxtQkFBbUIsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUM3RCxNQUFNLElBQUksR0FBRyxFQUFFLENBQUMsRUFBRSxDQUFDLGVBQWUsQ0FBQyx1QkFBdUIsQ0FBQyxDQUFDO1FBQzVELE1BQU0sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQy9CLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLFlBQVksZ0JBQWdCLENBQUMsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDNUQsQ0FBQyxDQUFDLENBQUM7SUFFSCxFQUFFLENBQUMsb0RBQW9ELEVBQUUsR0FBRyxFQUFFO1FBQzVELGdCQUFnQixDQUFDLGtCQUFrQixDQUFDLHFCQUFxQixDQUFDLENBQUM7UUFDM0QsTUFBTSxXQUFXLEdBQ2IsZ0JBQWdCLENBQUMsZUFBZSxDQUFDLENBQUMsWUFBWSxFQUFFLFlBQVksQ0FBQyxDQUFDLENBQUM7UUFDbkUsTUFBTSxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUMsWUFBWSxhQUFhLENBQUMsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7UUFFOUQsTUFBTSxDQUFDLGdCQUFnQixDQUFDLGVBQWUsQ0FBQztZQUN0QyxZQUFZLEVBQUUsWUFBWTtTQUMzQixDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLENBQUM7UUFDaEIsTUFBTSxDQUFDLGdCQUFnQixDQUFDLGVBQWUsQ0FBQyxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLENBQUM7UUFDckUsTUFBTSxDQUFDLGdCQUFnQixDQUFDLGVBQWUsQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsQ0FBQztJQUNyRSxDQUFDLENBQUMsQ0FBQztJQUVILEVBQUUsQ0FBQyxzQkFBc0IsRUFBRSxHQUFHLEVBQUU7UUFDOUIsZ0JBQWdCLENBQUMsa0JBQWtCLENBQUMsa0JBQWtCLENBQUMsQ0FBQztRQUV4RCxNQUFNLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxlQUFlLENBQUMsMkJBQTJCLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsQ0FBQztRQUN2RSw4REFBOEQ7UUFDOUQsTUFBTSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsZUFBZSxDQUFDLDBCQUEwQixDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLENBQUM7SUFDeEUsQ0FBQyxDQUFDLENBQUM7SUFFSCxNQUFNLHFCQUFxQixHQUFHLENBQUMsR0FBVyxFQUFFLFdBQXlCLEVBQUUsRUFBRTtRQUN2RSxPQUFPLElBQUksc0JBQXNCLENBQUMsR0FBRyxFQUFFLFdBQVcsQ0FBQyxDQUFDO0lBQ3RELENBQUMsQ0FBQztJQUVGLE1BQU0sc0JBQXNCO1FBRzFCLFlBQVksR0FBVyxFQUFtQixXQUF5QjtZQUF6QixnQkFBVyxHQUFYLFdBQVcsQ0FBYztRQUFHLENBQUM7UUFDdkUsSUFBSSxlQUFlO1lBQ2pCLE9BQU8sSUFBSSxDQUFDLFdBQVcsQ0FBQztRQUMxQixDQUFDO0tBQ0Y7SUFFRCxFQUFFLENBQUMsNEJBQTRCLEVBQUUsR0FBRyxFQUFFO1FBQ3BDLGdCQUFnQixDQUFDLGtCQUFrQixDQUFDLHFCQUFxQixDQUFDLENBQUM7UUFFM0QsTUFBTSxXQUFXLEdBQWdCO1lBQy9CLFVBQVUsRUFBRSxDQUFDLFFBQWdCLEVBQUUsRUFBRSxHQUFFLENBQUM7WUFDcEMsU0FBUyxFQUFFLEdBQUcsRUFBRSxHQUFFLENBQUM7U0FDcEIsQ0FBQztRQUNGLE1BQU0sV0FBVyxHQUFHLEVBQUUsQ0FBQyxFQUFFLENBQUMsZUFBZSxDQUFDLFlBQVksRUFBRSxXQUFXLENBQUMsQ0FBQztRQUNyRSxNQUFNLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUN0QyxNQUFNLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQyxZQUFZLHNCQUFzQixDQUFDLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ3ZFLDhDQUE4QztRQUM5QyxNQUFNLENBQUUsV0FBVyxDQUFDLENBQUMsQ0FBNEIsQ0FBQyxlQUFlLENBQUM7YUFDN0QsSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFDO0lBQ3pCLENBQUMsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgMjAxOCBHb29nbGUgTExDLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlIFwiTGljZW5zZVwiKTtcbiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS5cbiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdFxuICpcbiAqIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMFxuICpcbiAqIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmVcbiAqIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuIFwiQVMgSVNcIiBCQVNJUyxcbiAqIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLlxuICogU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZFxuICogbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICovXG5cbmltcG9ydCAqIGFzIHRmIGZyb20gJy4uL2luZGV4JztcbmltcG9ydCB7QlJPV1NFUl9FTlZTLCBkZXNjcmliZVdpdGhGbGFnc30gZnJvbSAnLi4vamFzbWluZV91dGlsJztcblxuaW1wb3J0IHtCcm93c2VySW5kZXhlZERCLCBicm93c2VySW5kZXhlZERCfSBmcm9tICcuL2luZGV4ZWRfZGInO1xuaW1wb3J0IHtCcm93c2VyTG9jYWxTdG9yYWdlLCBicm93c2VyTG9jYWxTdG9yYWdlfSBmcm9tICcuL2xvY2FsX3N0b3JhZ2UnO1xuaW1wb3J0IHtJT1JvdXRlclJlZ2lzdHJ5fSBmcm9tICcuL3JvdXRlcl9yZWdpc3RyeSc7XG5pbXBvcnQge0lPSGFuZGxlciwgTG9hZEhhbmRsZXIsIExvYWRPcHRpb25zLCBTYXZlSGFuZGxlcn0gZnJvbSAnLi90eXBlcyc7XG5cbmRlc2NyaWJlV2l0aEZsYWdzKCdJT1JvdXRlclJlZ2lzdHJ5JywgQlJPV1NFUl9FTlZTLCAoKSA9PiB7XG4gIGNvbnN0IGxvY2FsU3RvcmFnZVJvdXRlciA9ICh1cmw6IHN0cmluZykgPT4ge1xuICAgIGNvbnN0IHNjaGVtZSA9ICdsb2NhbHN0b3JhZ2U6Ly8nO1xuICAgIGlmICh1cmwuc3RhcnRzV2l0aChzY2hlbWUpKSB7XG4gICAgICByZXR1cm4gYnJvd3NlckxvY2FsU3RvcmFnZSh1cmwuc2xpY2Uoc2NoZW1lLmxlbmd0aCkpO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG4gIH07XG5cbiAgY29uc3QgaW5kZXhlZERCUm91dGVyID0gKHVybDogc3RyaW5nKSA9PiB7XG4gICAgY29uc3Qgc2NoZW1lID0gJ2luZGV4ZWRkYjovLyc7XG4gICAgaWYgKHVybC5zdGFydHNXaXRoKHNjaGVtZSkpIHtcbiAgICAgIHJldHVybiBicm93c2VySW5kZXhlZERCKHVybC5zbGljZShzY2hlbWUubGVuZ3RoKSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgfTtcblxuICBjbGFzcyBGYWtlSU9IYW5kbGVyIGltcGxlbWVudHMgSU9IYW5kbGVyIHtcbiAgICBjb25zdHJ1Y3Rvcih1cmwxOiBzdHJpbmcsIHVybDI6IHN0cmluZykge31cbiAgfVxuXG4gIGNvbnN0IGZha2VNdWx0aVN0cmluZ1JvdXRlciA9ICh1cmw6IHN0cmluZ3xzdHJpbmdbXSkgPT4ge1xuICAgIGNvbnN0IHNjaGVtZSA9ICdmb286Ly8nO1xuICAgIGlmIChBcnJheS5pc0FycmF5KHVybCkgJiYgdXJsLmxlbmd0aCA9PT0gMikge1xuICAgICAgaWYgKHVybFswXS5zdGFydHNXaXRoKHNjaGVtZSkgJiYgdXJsWzFdLnN0YXJ0c1dpdGgoc2NoZW1lKSkge1xuICAgICAgICByZXR1cm4gbmV3IEZha2VJT0hhbmRsZXIodXJsWzBdLCB1cmxbMV0pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgfTtcblxuICBsZXQgdGVtcFJlZ2lzdHJ5SW5zdGFuY2U6IElPUm91dGVyUmVnaXN0cnkgPSBudWxsO1xuICBiZWZvcmVFYWNoKCgpID0+IHtcbiAgICAvLyBGb3JjZSByZXNldCByZWdpc3RyeSBmb3IgdGVzdGluZy5cbiAgICAvLyB0c2xpbnQ6ZGlzYWJsZTpuby1hbnlcbiAgICB0ZW1wUmVnaXN0cnlJbnN0YW5jZSA9IChJT1JvdXRlclJlZ2lzdHJ5IGFzIGFueSkuaW5zdGFuY2U7XG4gICAgKElPUm91dGVyUmVnaXN0cnkgYXMgYW55KS5pbnN0YW5jZSA9IG51bGw7XG4gICAgLy8gdHNsaW50OmVuYWJsZTpuby1hbnlcbiAgfSk7XG5cbiAgYWZ0ZXJFYWNoKCgpID0+IHtcbiAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6bm8tYW55XG4gICAgKElPUm91dGVyUmVnaXN0cnkgYXMgYW55KS5pbnN0YW5jZSA9IHRlbXBSZWdpc3RyeUluc3RhbmNlO1xuICB9KTtcblxuICBpdCgnZ2V0U2F2ZUhhbmRsZXIgc3VjY2VlZHMnLCAoKSA9PiB7XG4gICAgSU9Sb3V0ZXJSZWdpc3RyeS5yZWdpc3RlclNhdmVSb3V0ZXIobG9jYWxTdG9yYWdlUm91dGVyKTtcbiAgICBJT1JvdXRlclJlZ2lzdHJ5LnJlZ2lzdGVyU2F2ZVJvdXRlcihpbmRleGVkREJSb3V0ZXIpO1xuXG4gICAgY29uc3Qgb3V0MSA9IHRmLmlvLmdldFNhdmVIYW5kbGVycygnbG9jYWxzdG9yYWdlOi8vZm9vLW1vZGVsJyk7XG4gICAgZXhwZWN0KG91dDEubGVuZ3RoKS50b0VxdWFsKDEpO1xuICAgIGV4cGVjdChvdXQxWzBdIGluc3RhbmNlb2YgQnJvd3NlckxvY2FsU3RvcmFnZSkudG9FcXVhbCh0cnVlKTtcbiAgICBjb25zdCBvdXQyID0gdGYuaW8uZ2V0U2F2ZUhhbmRsZXJzKCdpbmRleGVkZGI6Ly9mb28tbW9kZWwnKTtcbiAgICBleHBlY3Qob3V0Mi5sZW5ndGgpLnRvRXF1YWwoMSk7XG4gICAgZXhwZWN0KG91dDJbMF0gaW5zdGFuY2VvZiBCcm93c2VySW5kZXhlZERCKS50b0VxdWFsKHRydWUpO1xuICB9KTtcblxuICBpdCgnZ2V0TG9hZEhhbmRsZXIgc3VjY2VlZHMnLCAoKSA9PiB7XG4gICAgSU9Sb3V0ZXJSZWdpc3RyeS5yZWdpc3RlckxvYWRSb3V0ZXIobG9jYWxTdG9yYWdlUm91dGVyKTtcbiAgICBJT1JvdXRlclJlZ2lzdHJ5LnJlZ2lzdGVyTG9hZFJvdXRlcihpbmRleGVkREJSb3V0ZXIpO1xuXG4gICAgY29uc3Qgb3V0MSA9IHRmLmlvLmdldExvYWRIYW5kbGVycygnbG9jYWxzdG9yYWdlOi8vZm9vLW1vZGVsJyk7XG4gICAgZXhwZWN0KG91dDEubGVuZ3RoKS50b0VxdWFsKDEpO1xuICAgIGV4cGVjdChvdXQxWzBdIGluc3RhbmNlb2YgQnJvd3NlckxvY2FsU3RvcmFnZSkudG9FcXVhbCh0cnVlKTtcbiAgICBjb25zdCBvdXQyID0gdGYuaW8uZ2V0TG9hZEhhbmRsZXJzKCdpbmRleGVkZGI6Ly9mb28tbW9kZWwnKTtcbiAgICBleHBlY3Qob3V0Mi5sZW5ndGgpLnRvRXF1YWwoMSk7XG4gICAgZXhwZWN0KG91dDJbMF0gaW5zdGFuY2VvZiBCcm93c2VySW5kZXhlZERCKS50b0VxdWFsKHRydWUpO1xuICB9KTtcblxuICBpdCgnZ2V0TG9hZEhhbmRsZXIgd2l0aCBzdHJpbmcgYXJyYXkgYXJndW1lbnQgc3VjY2VlZHMnLCAoKSA9PiB7XG4gICAgSU9Sb3V0ZXJSZWdpc3RyeS5yZWdpc3RlckxvYWRSb3V0ZXIoZmFrZU11bHRpU3RyaW5nUm91dGVyKTtcbiAgICBjb25zdCBsb2FkSGFuZGxlciA9XG4gICAgICAgIElPUm91dGVyUmVnaXN0cnkuZ2V0TG9hZEhhbmRsZXJzKFsnZm9vOi8vLzEyMycsICdmb286Ly8vNDU2J10pO1xuICAgIGV4cGVjdChsb2FkSGFuZGxlclswXSBpbnN0YW5jZW9mIEZha2VJT0hhbmRsZXIpLnRvRXF1YWwodHJ1ZSk7XG5cbiAgICBleHBlY3QoSU9Sb3V0ZXJSZWdpc3RyeS5nZXRMb2FkSGFuZGxlcnMoW1xuICAgICAgJ2ZvbzovLy8xMjMnLCAnYmFyOi8vLzQ1NidcbiAgICBdKSkudG9FcXVhbChbXSk7XG4gICAgZXhwZWN0KElPUm91dGVyUmVnaXN0cnkuZ2V0TG9hZEhhbmRsZXJzKFsnZm9vOi8vLzEyMyddKSkudG9FcXVhbChbXSk7XG4gICAgZXhwZWN0KElPUm91dGVyUmVnaXN0cnkuZ2V0TG9hZEhhbmRsZXJzKCdmb286Ly8vMTIzJykpLnRvRXF1YWwoW10pO1xuICB9KTtcblxuICBpdCgnZ2V0U2F2ZUhhbmRsZXIgZmFpbHMnLCAoKSA9PiB7XG4gICAgSU9Sb3V0ZXJSZWdpc3RyeS5yZWdpc3RlclNhdmVSb3V0ZXIobG9jYWxTdG9yYWdlUm91dGVyKTtcblxuICAgIGV4cGVjdCh0Zi5pby5nZXRTYXZlSGFuZGxlcnMoJ2ludmFsaWRzY2hlbWU6Ly9mb28tbW9kZWwnKSkudG9FcXVhbChbXSk7XG4gICAgLy8gQ2hlY2sgdGhlcmUgaXMgbm8gY3Jvc3N0YWxrIGJldHdlZW4gc2F2ZSBhbmQgbG9hZCBoYW5kbGVycy5cbiAgICBleHBlY3QodGYuaW8uZ2V0TG9hZEhhbmRsZXJzKCdsb2NhbHN0b3JhZ2U6Ly9mb28tbW9kZWwnKSkudG9FcXVhbChbXSk7XG4gIH0pO1xuXG4gIGNvbnN0IGZha2VMb2FkT3B0aW9uc1JvdXRlciA9ICh1cmw6IHN0cmluZywgbG9hZE9wdGlvbnM/OiBMb2FkT3B0aW9ucykgPT4ge1xuICAgIHJldHVybiBuZXcgRmFrZUxvYWRPcHRpb25zSGFuZGxlcih1cmwsIGxvYWRPcHRpb25zKTtcbiAgfTtcblxuICBjbGFzcyBGYWtlTG9hZE9wdGlvbnNIYW5kbGVyIGltcGxlbWVudHMgSU9IYW5kbGVyIHtcbiAgICBzYXZlPzogU2F2ZUhhbmRsZXI7XG4gICAgbG9hZD86IExvYWRIYW5kbGVyO1xuICAgIGNvbnN0cnVjdG9yKHVybDogc3RyaW5nLCBwcml2YXRlIHJlYWRvbmx5IGxvYWRPcHRpb25zPzogTG9hZE9wdGlvbnMpIHt9XG4gICAgZ2V0IGxvYWRPcHRpb25zRGF0YSgpIHtcbiAgICAgIHJldHVybiB0aGlzLmxvYWRPcHRpb25zO1xuICAgIH1cbiAgfVxuXG4gIGl0KCdnZXRMb2FkSGFuZGxlciBsb2FkT3B0aW9ucycsICgpID0+IHtcbiAgICBJT1JvdXRlclJlZ2lzdHJ5LnJlZ2lzdGVyTG9hZFJvdXRlcihmYWtlTG9hZE9wdGlvbnNSb3V0ZXIpO1xuXG4gICAgY29uc3QgbG9hZE9wdGlvbnM6IExvYWRPcHRpb25zID0ge1xuICAgICAgb25Qcm9ncmVzczogKGZyYWN0aW9uOiBudW1iZXIpID0+IHt9LFxuICAgICAgZmV0Y2hGdW5jOiAoKSA9PiB7fVxuICAgIH07XG4gICAgY29uc3QgbG9hZEhhbmRsZXIgPSB0Zi5pby5nZXRMb2FkSGFuZGxlcnMoJ2ZvbzovLy8xMjMnLCBsb2FkT3B0aW9ucyk7XG4gICAgZXhwZWN0KGxvYWRIYW5kbGVyLmxlbmd0aCkudG9FcXVhbCgxKTtcbiAgICBleHBlY3QobG9hZEhhbmRsZXJbMF0gaW5zdGFuY2VvZiBGYWtlTG9hZE9wdGlvbnNIYW5kbGVyKS50b0VxdWFsKHRydWUpO1xuICAgIC8vIENoZWNrIGNhbGxiYWNrIGZ1bmN0aW9uIHBhc3NlZCB0byBJT0hhbmRsZXJcbiAgICBleHBlY3QoKGxvYWRIYW5kbGVyWzBdIGFzIEZha2VMb2FkT3B0aW9uc0hhbmRsZXIpLmxvYWRPcHRpb25zRGF0YSlcbiAgICAgICAgLnRvQmUobG9hZE9wdGlvbnMpO1xuICB9KTtcbn0pO1xuIl19 | 143.381679 | 13,430 | 0.891072 |
83b27de44b81874678bd9870121e336a8c48243d | 732 | js | JavaScript | lib/Proxyfier.js | imrefazekas/quanstructor | ff3c4590b288480711aa33206ee8dcf218eef288 | [
"MIT"
] | 1 | 2020-01-21T11:46:17.000Z | 2020-01-21T11:46:17.000Z | lib/Proxyfier.js | imrefazekas/quanstructor | ff3c4590b288480711aa33206ee8dcf218eef288 | [
"MIT"
] | null | null | null | lib/Proxyfier.js | imrefazekas/quanstructor | ff3c4590b288480711aa33206ee8dcf218eef288 | [
"MIT"
] | null | null | null | const PROPERTY_PRIM = '__primValue'
module.exports = (object, value) => {
const handler = {
getPrototypeOf (target) {
return Number.prototype
},
get (obj, prop) {
if (prop === 'valueOf') return () => {
return obj[PROPERTY_PRIM]
}
if (prop === 'toString') return () => {
return obj[PROPERTY_PRIM].toString()
}
return prop in obj ? obj[prop] : 37
}
}
Object.assign( object, {
[Symbol.toPrimitive] (hint) {
if (hint === 'number') {
return this[PROPERTY_PRIM]
}
if (hint === 'string') {
return this[PROPERTY_PRIM]
}
if (hint === 'default') {
return this[PROPERTY_PRIM]
}
return true
}
} )
object[PROPERTY_PRIM] = value
return new Proxy( object, handler )
}
| 20.333333 | 42 | 0.596995 |
83b354c871d112c4d84724f1cac2c50a14646e92 | 725 | js | JavaScript | ember-cli-rx/addon/helpers/observable.js | blesh/RxEmber | 9e6ebbde9ce898ba94c3aa6323d8e5c379dc07b0 | [
"MIT"
] | 47 | 2015-01-04T08:14:52.000Z | 2016-10-12T11:05:25.000Z | ember-cli-rx/addon/helpers/observable.js | benlesh/RxEmber | 9e6ebbde9ce898ba94c3aa6323d8e5c379dc07b0 | [
"MIT"
] | 8 | 2015-02-06T15:40:31.000Z | 2016-02-11T05:05:15.000Z | addon/helpers/observable.js | benlesh/ember-cli-rx | 02b270fca6d4daf93caa8b8c4c3632b1a795a032 | [
"MIT"
] | 7 | 2015-01-26T14:40:33.000Z | 2016-06-12T05:55:50.000Z | /* globals Ember */
/**
Creates a property that accepts Rx.Observables
and returns a single observable that represents the latest observable
passed.
This can be used for any input to a component that is an observable.
@method observable
@return Ember.ComputedProperty
*/
export default function observable() {
return Ember.computed(function(key, val){
var backingField = '_' + key;
if(!this[backingField]) {
this[backingField] = new Rx.BehaviorSubject(Rx.Observable.empty());
}
if(arguments.length > 1) {
var next = val && val instanceof Rx.Observable ? val : Rx.Observable.empty();
this[backingField].onNext(next);
}
return this[backingField]['switch']();
});
} | 26.851852 | 83 | 0.684138 |
83b49c74d8eed48182c1bc57e1b3f278f38a0f0b | 325 | js | JavaScript | examples/task.gulpfile.js | ehmicky/gulp-execa | fa64d11d18183a9d8c9e70d477635fbd74b8eaae | [
"Apache-2.0"
] | 58 | 2019-03-06T18:07:08.000Z | 2022-02-26T09:08:31.000Z | examples/task.gulpfile.js | ehmicky/gulp-execa | fa64d11d18183a9d8c9e70d477635fbd74b8eaae | [
"Apache-2.0"
] | 4 | 2019-06-18T10:25:41.000Z | 2021-06-21T22:37:11.000Z | examples/task.gulpfile.js | ehmicky/gulp-execa | fa64d11d18183a9d8c9e70d477635fbd74b8eaae | [
"Apache-2.0"
] | 2 | 2019-06-11T12:20:34.000Z | 2019-07-02T17:39:48.000Z | // Demo of the `task()` method.
// This file can be directly run:
// - first install `gulp-execa` and `gulp`
// - then `bash node_modules/gulp-execa/examples/task.sh`
// An online demo is also available at:
// https://repl.it/@ehmicky/gulp-execa
import { task } from 'gulp-execa'
export default task('npm --version')
| 29.545455 | 59 | 0.676923 |
83b4a6bda6bb5d4274e594c0b138d983768a913f | 133 | js | JavaScript | src/services/pubsub.js | GlobalFishingWatch/pipe-reports-subscriptions | 4062f8b1107d34c577f5543c2ab89918c9662f69 | [
"Apache-2.0"
] | 2 | 2017-09-12T07:54:52.000Z | 2017-10-11T12:50:32.000Z | src/services/pubsub.js | GlobalFishingWatch/pipe-reports | b00f39e66c7d75d2e49780f370fe226ccaef6643 | [
"Apache-2.0"
] | null | null | null | src/services/pubsub.js | GlobalFishingWatch/pipe-reports | b00f39e66c7d75d2e49780f370fe226ccaef6643 | [
"Apache-2.0"
] | null | null | null | const pubsub = require('@google-cloud/pubsub');
const config = require('../config');
module.exports = pubsub(config.gcloud.pubsub);
| 26.6 | 47 | 0.721805 |
83b4ee9d648bae8bf56f927e0c51bc5cd74d007a | 1,749 | js | JavaScript | src/scripts/vendor/pixijs/pixi-filters/filters/filter-dot/lib/filter-dot.es.js | voodoohop/pixijs-ts-boilerplate | 0fbd38cc7617e771f31f90c81f605134418cf501 | [
"MIT"
] | 65 | 2017-12-29T20:20:23.000Z | 2022-01-21T10:08:34.000Z | src/scripts/vendor/pixijs/pixi-filters/filters/filter-dot/lib/filter-dot.es.js | voodoohop/pixijs-ts-boilerplate | 0fbd38cc7617e771f31f90c81f605134418cf501 | [
"MIT"
] | 4 | 2020-09-07T10:24:18.000Z | 2021-05-10T15:43:29.000Z | src/scripts/vendor/pixijs/pixi-filters/filters/filter-dot/lib/filter-dot.es.js | voodoohop/pixijs-ts-boilerplate | 0fbd38cc7617e771f31f90c81f605134418cf501 | [
"MIT"
] | 18 | 2018-01-10T03:51:34.000Z | 2021-05-16T14:04:06.000Z | /*!
* @pixi/filter-dot - v2.5.0
* Compiled Wed, 10 Jan 2018 17:38:59 UTC
*
* @pixi/filter-dot is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/
import{Filter}from"pixi.js";var vertex="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",fragment="precision mediump float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec4 filterArea;\nuniform sampler2D uSampler;\n\nuniform float angle;\nuniform float scale;\n\nfloat pattern()\n{\n float s = sin(angle), c = cos(angle);\n vec2 tex = vTextureCoord * filterArea.xy;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float average = (color.r + color.g + color.b) / 3.0;\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\n}\n",DotFilter=function(e){function n(n,t){void 0===n&&(n=1),void 0===t&&(t=5),e.call(this,vertex,fragment),this.scale=n,this.angle=t}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var t={scale:{configurable:!0},angle:{configurable:!0}};return t.scale.get=function(){return this.uniforms.scale},t.scale.set=function(e){this.uniforms.scale=e},t.angle.get=function(){return this.uniforms.angle},t.angle.set=function(e){this.uniforms.angle=e},Object.defineProperties(n.prototype,t),n}(Filter);export{DotFilter};
//# sourceMappingURL=filter-dot.es.js.map
| 174.9 | 1,519 | 0.708977 |
83b57c8944aee8010656ce0a36d8c901338df3fe | 10,512 | js | JavaScript | public/js/mp.js | molinagustin/app_shop | da330b1024856d1750f746943286cb6e83cd9066 | [
"MIT"
] | null | null | null | public/js/mp.js | molinagustin/app_shop | da330b1024856d1750f746943286cb6e83cd9066 | [
"MIT"
] | null | null | null | public/js/mp.js | molinagustin/app_shop | da330b1024856d1750f746943286cb6e83cd9066 | [
"MIT"
] | null | null | null | window.onload = function () {
//CONFIGURACIONES PARA MERCADOPAGO
//PUBLIC KEY FRONTEND MP
const mp = new MercadoPago('TEST-3e3146d4-dce2-425a-9244-73da497ebfb8', {
locale: 'es-AR',
});
//Obtengo los tipos de Documentos
const identificationTypes = mp.getIdentificationTypes();
//Obtener metodo de pago de la tarjeta
document.getElementById('form-checkout__cardNumber').addEventListener('change', guessPaymentMethod);
function guessPaymentMethod(event) {
let cardnumber = document.getElementById("form-checkout__cardNumber").value;
if (cardnumber.length >= 6) {
//Bank Identification Number
let BIN = cardnumber.substring(0, 6);
//Forma de pago
const paymentMethods = mp.getPaymentMethods({
bin: BIN
});
document.getElementById('credit_card_logo').style.display = 'inline';
//Obtengo los bancos disponibles segun la tarjeta (No es necesario si se rellena con el numero de tarjeta)
/*const issuers = mp.getIssuers({
paymentMethodId: 'master',
bin: BIN
});*/
}
else{
document.getElementById('credit_card_logo').style.display = 'none';
}
};
const cardForm = mp.cardForm({
amount: document.getElementById('cartTotal').value,
autoMount: true,
processingMode: 'aggregator',
form: {
id: 'form-checkout',
cardholderName: {
id: 'form-checkout__cardholderName',
// placeholder: 'Cardholder name',
placeholder: 'Como figura en la tarjeta',
},
cardholderEmail: {
id: 'form-checkout__cardholderEmail',
placeholder: 'Email',
},
cardNumber: {
id: 'form-checkout__cardNumber',
// placeholder: 'Card number',
placeholder: 'Número Tarjeta',
},
cardExpirationMonth: {
id: 'form-checkout__cardExpirationMonth',
placeholder: 'MM'
},
cardExpirationYear: {
id: 'form-checkout__cardExpirationYear',
// placeholder: 'YYYY'
placeholder: 'YY'
},
securityCode: {
id: 'form-checkout__securityCode',
placeholder: 'CVV',
},
installments: {
id: 'form-checkout__installments',
// placeholder: 'Total installments'
placeholder: 'Cantidad'
},
identificationType: {
id: 'form-checkout__identificationType',
// placeholder: 'Document type'
placeholder: 'Tipo Documento'
},
identificationNumber: {
id: 'form-checkout__identificationNumber',
// placeholder: 'Document number'
placeholder: 'Sin "-" ni "."'
},
issuer: {
id: 'form-checkout__issuer',
// placeholder: 'Issuer'
placeholder: 'Entidad'
}
},
callbacks: {
onFormMounted: error => {
if (error) return console.warn('Form Mounted handling error: ', error)
console.log('Form mounted')
},
onFormUnmounted: error => {
if (error) return console.warn('Form Unmounted handling error: ', error)
console.log('Form unmounted')
},
onIdentificationTypesReceived: (error, identificationTypes) => {
if (error) return console.warn('identificationTypes handling error: ', error)
console.log('Identification types available: ', identificationTypes)
},
onPaymentMethodsReceived: (error, paymentMethods) => {
if (error) return console.warn('paymentMethods handling error: ', error)
console.log('Payment Methods available: ', paymentMethods)
document.getElementById('credit_card_logo').src = paymentMethods[0].thumbnail;
},
onIssuersReceived: (error, issuers) => {
if (error) return console.warn('issuers handling error: ', error)
console.log('Issuers available: ', issuers)
},
onInstallmentsReceived: (error, installments) => {
if (error) return console.warn('installments handling error: ', error)
console.log('Installments available: ', installments)
},
onCardTokenReceived: (error, token) => {
if (error) return console.warn('Token handling error: ', error)
console.log('Token available: ', token)
},
onSubmit: (event) => {
//event.preventDefault();
const cardData = cardForm.getCardFormData();
//Input Hidden Data
//document.getElementById('form-data').value = cardData;
console.log('CardForm data available: ', cardData)
},
onFetching: (resource) => {
console.log('Fetching resource: ', resource)
/*
// Animate progress bar
const progressBar = document.querySelector('.progress-bar')
progressBar.removeAttribute('value')
return () => {
progressBar.setAttribute('value', '0')
}*/
},
}
});
/*
//Obtener los tipos de documentos
//window.Mercadopago.getIdentificationTypes();
//Obtener metodo de pago de la tarjeta
document.getElementById('cardNumber').addEventListener('change', guessPaymentMethod);
function guessPaymentMethod(event) {
let cardnumber = document.getElementById("cardNumber").value;
if (cardnumber.length >= 6) {
let bin = cardnumber.substring(0, 6);
window.Mercadopago.getPaymentMethod({
"bin": bin
}, setPaymentMethod);
}
};
function setPaymentMethod(status, response) {
if (status == 200) {
let paymentMethod = response[0];
document.getElementById('paymentMethodId').value = paymentMethod.id;
getIssuers(paymentMethod.id);
} else {
alert(`payment method info error: ${response}`);
}
}
//Obtener banco emisor
function getIssuers(paymentMethodId) {
window.Mercadopago.getIssuers(
paymentMethodId,
setIssuers
);
}
function setIssuers(status, response) {
if (status == 200) {
let issuerSelect = document.getElementById('issuer');
response.forEach(issuer => {
let opt = document.createElement('option');
opt.text = issuer.name;
opt.value = issuer.id;
issuerSelect.appendChild(opt);
});
getInstallments(
document.getElementById('paymentMethodId').value,
document.getElementById('transactionAmount').value,
issuerSelect.value
);
} else {
alert(`issuers method info error: ${response}`);
}
}
//Obtener cantidad de cuotas segun tarjeta
function getInstallments(paymentMethodId, transactionAmount, issuerId) {
window.Mercadopago.getInstallments({
"payment_method_id": paymentMethodId,
"amount": parseFloat(transactionAmount),
"issuer_id": parseInt(issuerId)
}, setInstallments);
}
function setInstallments(status, response) {
if (status == 200) {
document.getElementById('installments').options.length = 0;
response[0].payer_costs.forEach(payerCost => {
let opt = document.createElement('option');
opt.text = payerCost.recommended_message;
opt.value = payerCost.installments;
document.getElementById('installments').appendChild(opt);
});
} else {
alert(`installments method info error: ${response}`);
}
}
//Crear el TOKEN para enviar datos de la tarjeta
doSubmit = false;
document.getElementById('paymentForm').addEventListener('submit', getCardToken);
function getCardToken(event) {
event.preventDefault();
if (!doSubmit) {
let $form = document.getElementById('paymentForm');
window.Mercadopago.createToken($form, setCardTokenAndPay);
return false;
}
};
function setCardTokenAndPay(status, response) {
if (status == 200 || status == 201) {
let form = document.getElementById('paymentForm');
let card = document.createElement('input');
card.setAttribute('name', 'token');
card.setAttribute('type', 'hidden');
card.setAttribute('value', response.id);
form.appendChild(card);
doSubmit = true;
form.submit();
} else {
alert("Verify filled data!\n" + JSON.stringify(response, null, 4));
}
};
//CONFIGURACIONES PARA MERCADOPAGO
*/
// this prevents from typing non-number text, including "e".
function isNumber(evt) {
evt = (evt) ? evt : window.event;
let charCode = (evt.which) ? evt.which : evt.keyCode;
if ((charCode > 31 && (charCode < 48 || charCode > 57)) && charCode !== 46) {
evt.preventDefault();
} else {
return true;
}
}
};
| 40.586873 | 121 | 0.509418 |
83b58175d648ef5a831565ba9289d61d51d19773 | 499 | js | JavaScript | models/psquare/general.js | faustixro/white-lotus-square-server | b1b8a2bd93782c9f164c4bc386c17c2d2f89312d | [
"0BSD"
] | null | null | null | models/psquare/general.js | faustixro/white-lotus-square-server | b1b8a2bd93782c9f164c4bc386c17c2d2f89312d | [
"0BSD"
] | 3 | 2017-12-02T16:09:46.000Z | 2019-01-26T14:39:48.000Z | models/psquare/general.js | faustixro/white-lotus-square-server | b1b8a2bd93782c9f164c4bc386c17c2d2f89312d | [
"0BSD"
] | null | null | null | 'use strict';
let mongoose = require('mongoose');
let Schema = mongoose.Schema;
let schema = new Schema({
number: {type: Number, min: 0, max: 9},
title: String,
description: String,
details: String,
element: String,
gender: String,
'zodiac 1': String,
'verb 1': String,
'zodiac 2': String,
'verb 2': String
},
{
collection: 'general'
});
module.exports = mongoose.model('GeneralNumbers', schema); | 22.681818 | 58 | 0.55511 |
83b584e651f667034c3e7f989e6ec4cd553c1ef2 | 437 | js | JavaScript | scripts/jalaali.js | Shasthojoy/hexo-theme-icarus_rtl_jalaali | 1dc839bd2b089695bc37e9188f82abb39b2d25c4 | [
"MIT"
] | 16 | 2017-01-31T10:51:03.000Z | 2021-01-12T13:26:00.000Z | scripts/jalaali.js | Shasthojoy/hexo-theme-icarus_rtl_jalaali | 1dc839bd2b089695bc37e9188f82abb39b2d25c4 | [
"MIT"
] | null | null | null | scripts/jalaali.js | Shasthojoy/hexo-theme-icarus_rtl_jalaali | 1dc839bd2b089695bc37e9188f82abb39b2d25c4 | [
"MIT"
] | 8 | 2017-05-14T04:29:14.000Z | 2022-01-17T16:30:33.000Z | /**
* Moment.js Jalaali Helper
* @description Jalaali Calendar Converter
* @example
* <%- jalaali(date) %>
*/
var moment = require('moment-jalaali');
hexo.extend.helper.register('jalaali', function (date) {
return moment(date).format('jYYYY/jM/jD'); // You can change the date format
});
hexo.extend.helper.register('jalaaliyear', function (date) {
return moment(date).format('jYYYY'); // You can change the date format
});
| 29.133333 | 80 | 0.688787 |
83b633d8b07237dcc025902b4bb789101afee671 | 16,154 | js | JavaScript | data/quests/12535.js | pwmirage/editor | f8018d05e1b6cc64b6b080ea8132b3e53eb4f01b | [
"MIT"
] | 4 | 2020-03-08T19:13:49.000Z | 2021-07-04T10:48:07.000Z | data/quests/12535.js | pwmirage/editor | f8018d05e1b6cc64b6b080ea8132b3e53eb4f01b | [
"MIT"
] | null | null | null | data/quests/12535.js | pwmirage/editor | f8018d05e1b6cc64b6b080ea8132b3e53eb4f01b | [
"MIT"
] | null | null | null | g_db.quests[12535]={id:12535,name:"Heavyweight Match Register",type:0,trigger_policy:0,on_give_up_parent_fail:1,on_success_parent_success:0,can_give_up:1,can_retake:1,can_retake_after_failure:1,on_fail_parent_fail:0,fail_on_death:0,simultaneous_player_limit:0,instant_teleport:{world:132,x:849.00000000,y:1.56490004,z:-1459.00000000,},ai_trigger:0,ai_trigger_enable:0,auto_trigger:0,trigger_on_death:0,remove_obtained_items:1,recommended_level:0,show_quest_title:0,show_as_gold_quest:0,start_npc:20210,finish_npc:0,is_craft_skill_quest:0,can_be_found:0,show_direction:1,level_min:80,level_max:89,dontshow_under_level_min:1,premise_coins:0,dontshow_without_premise_coins:1,req_reputation_min:0,req_reputation_max:0,dontshow_without_req_reputation:1,premise_quests:[],req_cultivation:0,dontshow_without_req_cultivation:1,req_faction_role:0,dontshow_without_req_faction_role:1,req_gender:0,dontshow_wrong_gender:1,req_class:0,dontshow_wrong_class:1,req_be_married:0,dontshow_without_marriage:0,req_be_gm:0,req_global_quest:0,req_global_quest_cond:0,quests_mutex:[],req_blacksmith_level:0,req_tailor_level:0,req_craftsman_level:0,req_apothecary_level:0,special_award_type:0,is_team_task:0,recv_in_team_only:0,req_success_type:0,req_npc_type:0,briefing:"You are now in the tournament. Fight through to the end and win your prize!",parent_quest:0,previous_quest:0,next_quest:0,sub_quest_first:12536,dialogue:{},on_success:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},on_failure:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,tp:{world:1,x:1836.00000000,y:222.00000000,z:1258.00000000,},ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},children:[
{id:12536,name:"Qualification Card",type:0,trigger_policy:0,on_give_up_parent_fail:1,on_success_parent_success:1,can_give_up:1,can_retake:1,can_retake_after_failure:1,on_fail_parent_fail:0,fail_on_death:0,simultaneous_player_limit:0,ai_trigger:0,ai_trigger_enable:0,auto_trigger:0,trigger_on_death:0,remove_obtained_items:1,recommended_level:0,show_quest_title:1,show_as_gold_quest:0,start_npc:0,finish_npc:0,is_craft_skill_quest:0,can_be_found:1,show_direction:1,level_min:0,level_max:0,dontshow_under_level_min:1,premise_coins:0,dontshow_without_premise_coins:1,req_reputation_min:0,req_reputation_max:0,dontshow_without_req_reputation:1,premise_quests:[],req_cultivation:0,dontshow_without_req_cultivation:1,req_faction_role:0,dontshow_without_req_faction_role:1,req_gender:0,dontshow_wrong_gender:1,req_class:0,dontshow_wrong_class:1,req_be_married:0,dontshow_without_marriage:0,req_be_gm:0,req_global_quest:0,req_global_quest_cond:0,quests_mutex:[],req_blacksmith_level:0,req_tailor_level:0,req_craftsman_level:0,req_apothecary_level:0,special_award_type:0,is_team_task:0,recv_in_team_only:0,req_success_type:2,req_npc_type:0,briefing:"Chests holding qualification cards will show up at 20:10. Who will get them?",parent_quest:12535,previous_quest:0,next_quest:12537,sub_quest_first:0,dialogue:{},on_success:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},on_failure:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},children:[]},
{id:12537,name:"Qualification Card",type:0,trigger_policy:0,on_give_up_parent_fail:1,on_success_parent_success:1,can_give_up:1,can_retake:1,can_retake_after_failure:1,on_fail_parent_fail:0,fail_on_death:0,simultaneous_player_limit:0,ai_trigger:0,ai_trigger_enable:0,auto_trigger:0,trigger_on_death:0,remove_obtained_items:1,recommended_level:0,show_quest_title:1,show_as_gold_quest:0,start_npc:0,finish_npc:0,is_craft_skill_quest:0,can_be_found:1,show_direction:1,level_min:0,level_max:0,dontshow_under_level_min:1,premise_coins:0,dontshow_without_premise_coins:1,req_reputation_min:0,req_reputation_max:0,dontshow_without_req_reputation:1,premise_quests:[],req_cultivation:0,dontshow_without_req_cultivation:1,req_faction_role:0,dontshow_without_req_faction_role:1,req_gender:0,dontshow_wrong_gender:1,req_class:0,dontshow_wrong_class:1,req_be_married:0,dontshow_without_marriage:0,req_be_gm:0,req_global_quest:0,req_global_quest_cond:0,quests_mutex:[],req_blacksmith_level:0,req_tailor_level:0,req_craftsman_level:0,req_apothecary_level:0,special_award_type:0,is_team_task:0,recv_in_team_only:0,req_success_type:2,req_npc_type:0,briefing:"Chests holding qualification cards will show up at 20:10. Who will get them?",parent_quest:12535,previous_quest:12536,next_quest:12538,sub_quest_first:0,dialogue:{},on_success:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},on_failure:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},children:[]},
{id:12538,name:"Qualification Card",type:0,trigger_policy:0,on_give_up_parent_fail:1,on_success_parent_success:1,can_give_up:1,can_retake:1,can_retake_after_failure:1,on_fail_parent_fail:0,fail_on_death:0,simultaneous_player_limit:0,ai_trigger:0,ai_trigger_enable:0,auto_trigger:0,trigger_on_death:0,remove_obtained_items:1,recommended_level:0,show_quest_title:1,show_as_gold_quest:0,start_npc:0,finish_npc:0,is_craft_skill_quest:0,can_be_found:1,show_direction:1,level_min:0,level_max:0,dontshow_under_level_min:1,premise_coins:0,dontshow_without_premise_coins:1,req_reputation_min:0,req_reputation_max:0,dontshow_without_req_reputation:1,premise_quests:[],req_cultivation:0,dontshow_without_req_cultivation:1,req_faction_role:0,dontshow_without_req_faction_role:1,req_gender:0,dontshow_wrong_gender:1,req_class:0,dontshow_wrong_class:1,req_be_married:0,dontshow_without_marriage:0,req_be_gm:0,req_global_quest:0,req_global_quest_cond:0,quests_mutex:[],req_blacksmith_level:0,req_tailor_level:0,req_craftsman_level:0,req_apothecary_level:0,special_award_type:0,is_team_task:0,recv_in_team_only:0,req_success_type:2,req_npc_type:0,briefing:"Chests holding qualification cards will show up at 20:10. Who will get them?",parent_quest:12535,previous_quest:12537,next_quest:12539,sub_quest_first:0,dialogue:{},on_success:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},on_failure:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},children:[]},
{id:12539,name:"Qualification Card",type:0,trigger_policy:0,on_give_up_parent_fail:1,on_success_parent_success:1,can_give_up:1,can_retake:1,can_retake_after_failure:1,on_fail_parent_fail:0,fail_on_death:0,simultaneous_player_limit:0,ai_trigger:0,ai_trigger_enable:0,auto_trigger:0,trigger_on_death:0,remove_obtained_items:1,recommended_level:0,show_quest_title:1,show_as_gold_quest:0,start_npc:0,finish_npc:0,is_craft_skill_quest:0,can_be_found:1,show_direction:1,level_min:0,level_max:0,dontshow_under_level_min:1,premise_coins:0,dontshow_without_premise_coins:1,req_reputation_min:0,req_reputation_max:0,dontshow_without_req_reputation:1,premise_quests:[],req_cultivation:0,dontshow_without_req_cultivation:1,req_faction_role:0,dontshow_without_req_faction_role:1,req_gender:0,dontshow_wrong_gender:1,req_class:0,dontshow_wrong_class:1,req_be_married:0,dontshow_without_marriage:0,req_be_gm:0,req_global_quest:0,req_global_quest_cond:0,quests_mutex:[],req_blacksmith_level:0,req_tailor_level:0,req_craftsman_level:0,req_apothecary_level:0,special_award_type:0,is_team_task:0,recv_in_team_only:0,req_success_type:2,req_npc_type:0,briefing:"Chests holding qualification cards will show up at 20:10. Who will get them?",parent_quest:12535,previous_quest:12538,next_quest:12540,sub_quest_first:0,dialogue:{},on_success:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},on_failure:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},children:[]},
{id:12540,name:"Qualification Card",type:0,trigger_policy:0,on_give_up_parent_fail:1,on_success_parent_success:1,can_give_up:1,can_retake:1,can_retake_after_failure:1,on_fail_parent_fail:0,fail_on_death:0,simultaneous_player_limit:0,ai_trigger:0,ai_trigger_enable:0,auto_trigger:0,trigger_on_death:0,remove_obtained_items:1,recommended_level:0,show_quest_title:1,show_as_gold_quest:0,start_npc:0,finish_npc:0,is_craft_skill_quest:0,can_be_found:1,show_direction:1,level_min:0,level_max:0,dontshow_under_level_min:1,premise_coins:0,dontshow_without_premise_coins:1,req_reputation_min:0,req_reputation_max:0,dontshow_without_req_reputation:1,premise_quests:[],req_cultivation:0,dontshow_without_req_cultivation:1,req_faction_role:0,dontshow_without_req_faction_role:1,req_gender:0,dontshow_wrong_gender:1,req_class:0,dontshow_wrong_class:1,req_be_married:0,dontshow_without_marriage:0,req_be_gm:0,req_global_quest:0,req_global_quest_cond:0,quests_mutex:[],req_blacksmith_level:0,req_tailor_level:0,req_craftsman_level:0,req_apothecary_level:0,special_award_type:0,is_team_task:0,recv_in_team_only:0,req_success_type:2,req_npc_type:0,briefing:"Chests holding qualification cards will show up at 20:10. Who will get them?",parent_quest:12535,previous_quest:12539,next_quest:12541,sub_quest_first:0,dialogue:{},on_success:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},on_failure:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},children:[]},
{id:12541,name:"Qualification Card",type:0,trigger_policy:0,on_give_up_parent_fail:1,on_success_parent_success:1,can_give_up:1,can_retake:1,can_retake_after_failure:1,on_fail_parent_fail:0,fail_on_death:0,simultaneous_player_limit:0,ai_trigger:0,ai_trigger_enable:0,auto_trigger:0,trigger_on_death:0,remove_obtained_items:1,recommended_level:0,show_quest_title:1,show_as_gold_quest:0,start_npc:0,finish_npc:0,is_craft_skill_quest:0,can_be_found:1,show_direction:1,level_min:0,level_max:0,dontshow_under_level_min:1,premise_coins:0,dontshow_without_premise_coins:1,req_reputation_min:0,req_reputation_max:0,dontshow_without_req_reputation:1,premise_quests:[],req_cultivation:0,dontshow_without_req_cultivation:1,req_faction_role:0,dontshow_without_req_faction_role:1,req_gender:0,dontshow_wrong_gender:1,req_class:0,dontshow_wrong_class:1,req_be_married:0,dontshow_without_marriage:0,req_be_gm:0,req_global_quest:0,req_global_quest_cond:0,quests_mutex:[],req_blacksmith_level:0,req_tailor_level:0,req_craftsman_level:0,req_apothecary_level:0,special_award_type:0,is_team_task:0,recv_in_team_only:0,req_success_type:2,req_npc_type:0,briefing:"Chests holding qualification cards will show up at 20:10. Who will get them?",parent_quest:12535,previous_quest:12540,next_quest:12542,sub_quest_first:0,dialogue:{},on_success:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},on_failure:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},children:[]},
{id:12542,name:"Qualification Card",type:0,trigger_policy:0,on_give_up_parent_fail:1,on_success_parent_success:1,can_give_up:1,can_retake:1,can_retake_after_failure:1,on_fail_parent_fail:0,fail_on_death:0,simultaneous_player_limit:0,ai_trigger:0,ai_trigger_enable:0,auto_trigger:0,trigger_on_death:0,remove_obtained_items:1,recommended_level:0,show_quest_title:1,show_as_gold_quest:0,start_npc:0,finish_npc:0,is_craft_skill_quest:0,can_be_found:1,show_direction:1,level_min:0,level_max:0,dontshow_under_level_min:1,premise_coins:0,dontshow_without_premise_coins:1,req_reputation_min:0,req_reputation_max:0,dontshow_without_req_reputation:1,premise_quests:[],req_cultivation:0,dontshow_without_req_cultivation:1,req_faction_role:0,dontshow_without_req_faction_role:1,req_gender:0,dontshow_wrong_gender:1,req_class:0,dontshow_wrong_class:1,req_be_married:0,dontshow_without_marriage:0,req_be_gm:0,req_global_quest:0,req_global_quest_cond:0,quests_mutex:[],req_blacksmith_level:0,req_tailor_level:0,req_craftsman_level:0,req_apothecary_level:0,special_award_type:0,is_team_task:0,recv_in_team_only:0,req_success_type:2,req_npc_type:0,briefing:"Chests holding qualification cards will show up at 20:10. Who will get them?",parent_quest:12535,previous_quest:12541,next_quest:12543,sub_quest_first:0,dialogue:{},on_success:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},on_failure:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},children:[]},
{id:12543,name:"Qualification Card",type:0,trigger_policy:0,on_give_up_parent_fail:1,on_success_parent_success:1,can_give_up:1,can_retake:1,can_retake_after_failure:1,on_fail_parent_fail:0,fail_on_death:0,simultaneous_player_limit:0,ai_trigger:0,ai_trigger_enable:0,auto_trigger:0,trigger_on_death:0,remove_obtained_items:1,recommended_level:0,show_quest_title:1,show_as_gold_quest:0,start_npc:0,finish_npc:0,is_craft_skill_quest:0,can_be_found:1,show_direction:1,level_min:0,level_max:0,dontshow_under_level_min:1,premise_coins:0,dontshow_without_premise_coins:1,req_reputation_min:0,req_reputation_max:0,dontshow_without_req_reputation:1,premise_quests:[],req_cultivation:0,dontshow_without_req_cultivation:1,req_faction_role:0,dontshow_without_req_faction_role:1,req_gender:0,dontshow_wrong_gender:1,req_class:0,dontshow_wrong_class:1,req_be_married:0,dontshow_without_marriage:0,req_be_gm:0,req_global_quest:0,req_global_quest_cond:0,quests_mutex:[],req_blacksmith_level:0,req_tailor_level:0,req_craftsman_level:0,req_apothecary_level:0,special_award_type:0,is_team_task:0,recv_in_team_only:0,req_success_type:2,req_npc_type:0,briefing:"Chests holding qualification cards will show up at 20:10. Who will get them?",parent_quest:12535,previous_quest:12542,next_quest:0,sub_quest_first:0,dialogue:{},on_success:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},on_failure:{normal:{xp:0,sp:0,coins:0,rep:0,culti:0,chi:0,level_multiplier:0,new_waypoint:0,storage_slots:0,inventory_slots:0,petbag_slots:0,ai_trigger:0,ai_trigger_enable:0,divorce:0,item_groups:[],},by_time:[],by_item_cnt:[],},children:[]},]};
| 1,615.4 | 1,934 | 0.855639 |
83b63e649440dad852a7f26710d7e0e5ff789664 | 1,473 | js | JavaScript | test/web/crypto.spec.js | buttercup/app-env | 06ec8eb9e6ba05c8cb44ee648193680db4588ce0 | [
"MIT"
] | 2 | 2020-01-02T20:49:06.000Z | 2021-02-06T05:00:18.000Z | test/web/crypto.spec.js | buttercup/app-env | 06ec8eb9e6ba05c8cb44ee648193680db4588ce0 | [
"MIT"
] | null | null | null | test/web/crypto.spec.js | buttercup/app-env | 06ec8eb9e6ba05c8cb44ee648193680db4588ce0 | [
"MIT"
] | null | null | null | describe("crypto", function() {
const { "app-env": { getSharedAppEnv } } = window;
function arrayBuffersEqual(buf1, buf2) {
if (buf1.byteLength != buf2.byteLength) return false;
const dv1 = new Uint8Array(buf1);
const dv2 = new Uint8Array(buf2);
for (let i = 0; i <= buf1.byteLength; i += 1) {
if (dv1[i] !== dv2[i]) return false;
}
return true;
}
describe("encryption", function() {
it("can encrypt text", function() {
const encrypt = getSharedAppEnv().getProperty("crypto/v1/encryptText");
const decrypt = getSharedAppEnv().getProperty("crypto/v1/decryptText");
return encrypt("test", "pass")
.then(enc => decrypt(enc, "pass"))
.then(res => {
expect(res).to.equal("test");
});
});
it("can encrypt buffers", function() {
const encrypt = getSharedAppEnv().getProperty("crypto/v1/encryptBuffer");
const decrypt = getSharedAppEnv().getProperty("crypto/v1/decryptBuffer");
const arr = new Uint8Array([0xff, 0x01, 0x45, 0xf5, 0x80, 0xac, 0xf4]);
const buff = arr.buffer;
return encrypt(arr, "pass")
.then(enc => decrypt(enc, "pass"))
.then(res => {
expect(res).to.satisfy(buff2 => arrayBuffersEqual(buff2, buff));
});
});
});
});
| 38.763158 | 85 | 0.526816 |
83b717caa3cccc1062f77cc38d548c08a4da01b6 | 6,294 | js | JavaScript | spec/suites/core/ClassSpec.js | geoapify/Leaflet | e9bc85952d955347bbfd0a2d7909fdc51f08a48a | [
"BSD-2-Clause"
] | 26,758 | 2015-01-01T01:37:52.000Z | 2022-03-31T22:03:15.000Z | spec/suites/core/ClassSpec.js | geoapify/Leaflet | e9bc85952d955347bbfd0a2d7909fdc51f08a48a | [
"BSD-2-Clause"
] | 4,469 | 2015-01-01T08:39:06.000Z | 2022-03-31T21:54:59.000Z | spec/suites/core/ClassSpec.js | jonkoops/Leaflet | 7dbc5f646b2463363d27e4a86a4e54ceb54f89e4 | [
"BSD-2-Clause"
] | 5,120 | 2015-01-01T06:46:23.000Z | 2022-03-31T19:15:43.000Z | /* eslint no-new: 0 */
describe("Class", function () {
describe("#extend", function () {
var Klass,
props,
constructor,
method;
beforeEach(function () {
constructor = sinon.spy();
method = sinon.spy();
props = {
statics: {bla: 1},
includes: {mixin: true},
initialize: constructor,
foo: 5,
bar: method
};
Klass = L.Class.extend(props);
});
it("creates a class with the given constructor & properties", function () {
var a = new Klass();
expect(constructor.called).to.be.ok();
expect(a.foo).to.eql(5);
a.bar();
expect(method.called).to.be.ok();
});
it("inherits parent classes' constructor & properties", function () {
var Klass2 = Klass.extend({baz: 2});
var b = new Klass2();
expect(b instanceof Klass).to.be.ok();
expect(b instanceof Klass2).to.be.ok();
expect(constructor.called).to.be.ok();
expect(b.baz).to.eql(2);
b.bar();
expect(method.called).to.be.ok();
});
it("does not modify source props object", function () {
expect(props).to.eql({
statics: {bla: 1},
includes: {mixin: true},
initialize: constructor,
foo: 5,
bar: method
});
});
it("supports static properties", function () {
expect(Klass.bla).to.eql(1);
});
it("does not merge 'statics' property itself", function () {
expect('statics' in Klass.prototype).to.not.be.ok();
});
it("inherits parent static properties", function () {
var Klass2 = Klass.extend({});
expect(Klass2.bla).to.eql(1);
});
it("overrides parent static properties", function () {
var Klass2 = Klass.extend({statics: {bla: 2}});
expect(Klass2.bla).to.eql(2);
});
it("includes the given mixin", function () {
var a = new Klass();
expect(a.mixin).to.be.ok();
});
it("does not merge 'includes' property itself", function () {
expect('includes' in Klass.prototype).to.not.be.ok();
});
it("includes multiple mixins", function () {
var Klass2 = L.Class.extend({
includes: [{mixin: true}, {mixin2: true}]
});
var a = new Klass2();
expect(a.mixin).to.be.ok();
expect(a.mixin2).to.be.ok();
});
it("grants the ability to include the given mixin", function () {
Klass.include({mixin2: true});
var a = new Klass();
expect(a.mixin2).to.be.ok();
});
it("merges options instead of replacing them", function () {
var KlassWithOptions1 = L.Class.extend({
options: {
foo1: 1,
foo2: 2
}
});
var KlassWithOptions2 = KlassWithOptions1.extend({
options: {
foo2: 3,
foo3: 4
}
});
var a = new KlassWithOptions2();
expect(a.options.foo1).to.eql(1);
expect(a.options.foo2).to.eql(3);
expect(a.options.foo3).to.eql(4);
});
it("gives new classes a distinct options object", function () {
var K1 = L.Class.extend({options: {}});
var K2 = K1.extend({});
expect(K2.prototype.options).not.to.equal(K1.prototype.options);
});
it("inherits options prototypally", function () {
var K1 = L.Class.extend({options: {}});
var K2 = K1.extend({options: {}});
K1.prototype.options.foo = 'bar';
expect(K2.prototype.options.foo).to.eql('bar');
});
it("does not reuse original props.options", function () {
var props = {options: {}};
var K = L.Class.extend(props);
expect(K.prototype.options).not.to.be(props.options);
});
it("does not replace source props.options object", function () {
var K1 = L.Class.extend({options: {}});
var opts = {};
var props = {options: opts};
K1.extend(props);
expect(props.options).to.be(opts);
});
it("prevents change of prototype options", function () {
var Klass = L.Class.extend({options: {}});
var instance = new Klass();
expect(Klass.prototype.options).to.not.be(instance.options);
});
it("adds constructor hooks correctly", function () {
var spy1 = sinon.spy();
Klass.addInitHook(spy1);
Klass.addInitHook('bar', 1, 2, 3);
new Klass();
expect(spy1.called).to.be.ok();
expect(method.calledWith(1, 2, 3));
});
it("inherits constructor hooks", function () {
var spy1 = sinon.spy(),
spy2 = sinon.spy();
var Klass2 = Klass.extend({});
Klass.addInitHook(spy1);
Klass2.addInitHook(spy2);
new Klass2();
expect(spy1.called).to.be.ok();
expect(spy2.called).to.be.ok();
});
it("does not call child constructor hooks", function () {
var spy1 = sinon.spy(),
spy2 = sinon.spy();
var Klass2 = Klass.extend({});
Klass.addInitHook(spy1);
Klass2.addInitHook(spy2);
new Klass();
expect(spy1.called).to.be.ok();
expect(spy2.called).to.eql(false);
});
it("calls parent constructor hooks when child has none", function () {
var spy1 = sinon.spy();
Klass.addInitHook(spy1);
var Klass2 = Klass.extend({});
new Klass2();
expect(spy1.called).to.be.ok();
});
});
describe("#include", function () {
var Klass;
beforeEach(function () {
Klass = L.Class.extend({});
});
it("returns the class with the extra methods", function () {
var q = sinon.spy();
var Qlass = Klass.include({quux: q});
var a = new Klass();
var b = new Qlass();
a.quux();
expect(q.called).to.be.ok();
b.quux();
expect(q.called).to.be.ok();
});
it("keeps parent options", function () { // #6070
var Quux = L.Class.extend({
options: {foo: 'Foo!'}
});
Quux.include({
options: {bar: 'Bar!'}
});
var q = new Quux();
expect(q.options).to.have.property('foo');
expect(q.options).to.have.property('bar');
});
it("does not reuse original props.options", function () {
var props = {options: {}};
var K = Klass.include(props);
expect(K.prototype.options).not.to.be(props.options);
});
it("does not replace source props.options object", function () {
var K1 = Klass.include({options: {}});
var opts = {};
var props = {options: opts};
K1.extend(props);
expect(props.options).to.be(opts);
});
});
// TODO Class.mergeOptions
});
| 22.970803 | 78 | 0.574515 |
83b7967c181994b3a9bc94cf070b809edcbc6ee4 | 287 | js | JavaScript | docs/classtnah_1_1_mouse_button_released_event.js | BryceStandley/TNAH | 909ba9cf9f04632a3b518646c3af39752bd9d407 | [
"MIT"
] | 1 | 2021-11-08T09:44:40.000Z | 2021-11-08T09:44:40.000Z | docs/classtnah_1_1_mouse_button_released_event.js | BryceStandley/TNAH | 909ba9cf9f04632a3b518646c3af39752bd9d407 | [
"MIT"
] | null | null | null | docs/classtnah_1_1_mouse_button_released_event.js | BryceStandley/TNAH | 909ba9cf9f04632a3b518646c3af39752bd9d407 | [
"MIT"
] | null | null | null | var classtnah_1_1_mouse_button_released_event =
[
[ "MouseButtonReleasedEvent", "classtnah_1_1_mouse_button_released_event.html#aabad02d1e7b68f7431e512f6638449a4", null ],
[ "ToString", "classtnah_1_1_mouse_button_released_event.html#ae65bae8fa7aab00925baef026a02ba16", null ]
]; | 57.4 | 125 | 0.836237 |
83b7b36bed359871c6e949519366a79a88d009c6 | 3,912 | js | JavaScript | test/script-helper-test.js | victornikitin/bpmn-engine | 0d5a71343e9429858a6ac3a36cb5b79cbdfcb8b7 | [
"BSD-3-Clause"
] | 1 | 2019-02-27T19:24:03.000Z | 2019-02-27T19:24:03.000Z | test/script-helper-test.js | volodyad/bpmn-engine | 475ae2c8c23d73918bfc272f786c0757992e868b | [
"BSD-3-Clause"
] | null | null | null | test/script-helper-test.js | volodyad/bpmn-engine | 475ae2c8c23d73918bfc272f786c0757992e868b | [
"BSD-3-Clause"
] | null | null | null | 'use strict';
const Code = require('code');
const Lab = require('lab');
const lab = exports.lab = Lab.script();
const expect = Code.expect;
const scriptHelper = require('../lib/script-helper');
lab.experiment('script-helper', () => {
lab.describe('isJavascript()', () => {
lab.test('returns true if JavaScript', (done) => {
expect(scriptHelper.isJavascript('JavaScript')).to.be.true();
done();
});
lab.test('returns false if not JavaScript', (done) => {
expect(scriptHelper.isJavascript('c#')).to.be.false();
done();
});
lab.test('is case insensitive', (done) => {
expect(scriptHelper.isJavascript('javascript')).to.be.true();
done();
});
});
lab.describe('#parse', () => {
lab.test('takes filename and script string and returns contextified script', (done) => {
expect(scriptHelper.parse.bind(null, 'unit-test.js', 'i = 1')).to.not.throw();
done();
});
lab.test('unless it has a syntax error', (done) => {
expect(scriptHelper.parse.bind(null, 'unit-test.js', 'function (')).to.throw(SyntaxError, /unexpected token/i);
done();
});
});
lab.describe('#execute', () => {
lab.test('takes parsed script and returns result', (done) => {
const script = scriptHelper.parse('unit-test.js', 'true');
expect(scriptHelper.execute(script)).to.equal(true);
done();
});
lab.test('takes parsed script and variables and returns result', (done) => {
const script = scriptHelper.parse('unit-test.js', 'variables.i;');
expect(scriptHelper.execute(script, {
variables: {
i: true
}
})).to.equal(true);
done();
});
lab.test('throws if execution fails', (done) => {
const script = scriptHelper.parse('unit-test.js', 'variables.i.j;');
try {
scriptHelper.execute(script, {
variables: undefined
});
} catch (e) {
var err = e; // eslint-disable-line no-var
}
expect(err.message).to.equal('Cannot read property \'i\' of undefined');
done();
});
lab.test('passes variables as context object', (done) => {
const script = scriptHelper.parse('unit-test.js', 'variables.i = 1; variables.i;');
const context = {
variables: {
i: true
}
};
expect(scriptHelper.execute(script, context)).to.equal(1);
expect(context.variables.i).to.equal(1);
done();
});
lab.test('takes message as third argument', (done) => {
const script = scriptHelper.parse('unit-test.js', 'i');
const message = {
i: true
};
expect(scriptHelper.execute(script, null, message)).to.be.true();
done();
});
lab.test('message is a shallow copy', (done) => {
const script = scriptHelper.parse('unit-test.js', 'i = false; i;');
const message = {
i: true
};
expect(scriptHelper.execute(script, null, message)).to.be.false();
expect(message.i).to.be.true();
done();
});
lab.test('fourth argument is callback and is passed as next to script', (done) => {
const script = scriptHelper.parse('unit-test.js', 'next()');
const message = {
i: true
};
scriptHelper.execute(script, null, message, done);
});
lab.test('next has to be called or the script will not finish', (done) => {
const script = scriptHelper.parse('unit-test.js', 'i = false;');
const message = {
i: true
};
scriptHelper.execute(script, null, message, () => {
Code.fail('next was not supposed to be called');
});
setTimeout(() => {
done();
}, 10);
});
lab.test('third argument can be used as callback', (done) => {
const script = scriptHelper.parse('unit-test.js', 'next()');
scriptHelper.execute(script, null, done);
});
});
});
| 29.19403 | 117 | 0.569785 |
83b80348b0a8a9ccf88ca1aec01db2795a31870c | 96,303 | js | JavaScript | src/Application.Web/Scripts/angular.min.js | manuelnelson/BoilerPlateMVC | 691bc6890b49df353721b61d9206e342e6ec3875 | [
"BSD-2-Clause"
] | 7 | 2016-02-05T11:53:20.000Z | 2022-02-23T16:40:51.000Z | src/Application.Web/Scripts/angular.min.js | manuelnelson/BoilerPlateMVC | 691bc6890b49df353721b61d9206e342e6ec3875 | [
"BSD-2-Clause"
] | null | null | null | src/Application.Web/Scripts/angular.min.js | manuelnelson/BoilerPlateMVC | 691bc6890b49df353721b61d9206e342e6ec3875 | [
"BSD-2-Clause"
] | 1 | 2022-02-23T16:40:53.000Z | 2022-02-23T16:40:53.000Z | (function(a,b,c){function d(a){return function(){var b=arguments[0],c="["+(a?a+":":"")+b+"] ",d=arguments[1],e=arguments,f=function(a){return Q(a)?a.toString().replace(/ \{[\s\S]*$/,""):J(a)?"undefined":M(a)?a:JSON.stringify(a)},g,h;g=c+d.replace(/\{\d+\}/g,function(a){var b=+a.slice(1,-1),c;if(b+2<e.length)return c=e[b+2],Q(c)?c.toString().replace(/ ?\{[\s\S]*$/,""):J(c)?"undefined":M(c)?c:bk(c);return a}),g=g+"\nhttp://errors.angularjs.org/"+bC.full+"/"+(a?a+"/":"")+b;for(h=2;h<arguments.length;h++)g=g+(h==2?"?":"&")+"p"+(h-2)+"="+encodeURIComponent(f(arguments[h]));return new Error(g)}}function w(a){if(a==null||S(a))return!1;var b=a.length;return a.nodeType===1&&b?!0:P(a)||!Q(a)&&(b===0||typeof b=="number"&&b>0&&b-1 in a)}function x(a,b,c){var d;if(a)if(Q(a))for(d in a)d!="prototype"&&d!="length"&&d!="name"&&a.hasOwnProperty(d)&&b.call(c,a[d],d);else if(a.forEach&&a.forEach!==x)a.forEach(b,c);else if(w(a))for(d=0;d<a.length;d++)b.call(c,a[d],d);else for(d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d);return a}function y(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b.sort()}function z(a,b,c){var d=y(a);for(var e=0;e<d.length;e++)b.call(c,a[d[e]],d[e]);return d}function A(a){return function(b,c){a(c,b)}}function B(){var a=v.length,b;while(a){a--,b=v[a].charCodeAt(0);if(b==57)return v[a]="A",v.join("");if(b==90)v[a]="0";else return v[a]=String.fromCharCode(b+1),v.join("")}return v.unshift("0"),v.join("")}function C(a,b){b?a.$$hashKey=b:delete a.$$hashKey}function D(a){var b=a.$$hashKey;return x(arguments,function(b){b!==a&&x(b,function(b,c){a[c]=b})}),C(a,b),a}function E(a){return parseInt(a,10)}function F(a,b){return D(new(D(function(){},{prototype:a})),b)}function G(){}function H(a){return a}function I(a){return function(){return a}}function J(a){return typeof a=="undefined"}function K(a){return typeof a!="undefined"}function L(a){return a!=null&&typeof a=="object"}function M(a){return typeof a=="string"}function N(a){return typeof a=="number"}function O(a){return p.apply(a)=="[object Date]"}function P(a){return p.apply(a)=="[object Array]"}function Q(a){return typeof a=="function"}function R(a){return p.apply(a)=="[object RegExp]"}function S(a){return a&&a.document&&a.location&&a.alert&&a.setInterval}function T(a){return a&&a.$evalAsync&&a.$watch}function U(a){return p.apply(a)==="[object File]"}function V(a){return typeof a=="boolean"}function X(a){return a&&(a.nodeName||a.on&&a.find)}function Y(a){var b={},c=a.split(","),d;for(d=0;d<c.length;d++)b[c[d]]=!0;return b}function Z(a,b,c){var d=[];return x(a,function(a,e,f){d.push(b.call(c,a,e,f))}),d}function $(a,b){var c=0,d;if(P(a)||M(a))return a.length;if(L(a))for(d in a)(!b||a.hasOwnProperty(d))&&c++;return c}function _(a,b){return ba(a,b)!=-1}function ba(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0;c<a.length;c++)if(b===a[c])return c;return-1}function bb(a,b){var c=ba(a,b);return c>=0&&a.splice(c,1),b}function bc(a){if(a)switch(a.nodeName){case"OPTION":case"PRE":case"TITLE":return!0}return!1}function bd(a,b){if(S(a)||T(a))throw q("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(!b)b=a,a&&(P(a)?b=bd(a,[]):O(a)?b=new Date(a.getTime()):R(a)?b=new RegExp(a.source):L(a)&&(b=bd(a,{})));else{if(a===b)throw q("cpi","Can't copy! Source and destination are identical.");if(P(a)){b.length=0;for(var c=0;c<a.length;c++)b.push(bd(a[c]))}else{var d=b.$$hashKey;x(b,function(a,c){delete b[c]});for(var e in a)b[e]=bd(a[e]);C(b,d)}}return b}function be(a,b){b=b||{};for(var c in a)a.hasOwnProperty(c)&&c.substr(0,2)!=="$$"&&(b[c]=a[c]);return b}function bf(a,b){if(a===b)return!0;if(a===null||b===null)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,e=typeof b,f,g,h;if(d==e&&d=="object"){if(!P(a)){if(O(a))return O(b)&&a.getTime()==b.getTime();if(R(a)&&R(b))return a.toString()==b.toString();if(T(a)||T(b)||S(a)||S(b)||P(b))return!1;h={};for(g in a){if(g.charAt(0)==="$"||Q(a[g]))continue;if(!bf(a[g],b[g]))return!1;h[g]=!0}for(g in b)if(!h.hasOwnProperty(g)&&g.charAt(0)!=="$"&&b[g]!==c&&!Q(b[g]))return!1;return!0}if(!P(b))return!1;if((f=a.length)==b.length){for(g=0;g<f;g++)if(!bf(a[g],b[g]))return!1;return!0}}return!1}function bg(a,b,c){return a.concat(n.call(b,c))}function bh(a,b){return n.call(a,b||0)}function bi(a,b){var c=arguments.length>2?bh(arguments,2):[];return!Q(b)||b instanceof RegExp?b:c.length?function(){return arguments.length?b.apply(a,c.concat(n.call(arguments,0))):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function bj(a,d){var e=d;return/^\$+/.test(a)?e=c:S(d)?e="$WINDOW":d&&b===d?e="$DOCUMENT":T(d)&&(e="$SCOPE"),e}function bk(a,b){return typeof a=="undefined"?c:JSON.stringify(a,bj,b?" ":null)}function bl(a){return M(a)?JSON.parse(a):a}function bm(a){if(a&&a.length!==0){var b=g(""+a);a=b!="f"&&b!="0"&&b!="false"&&b!="no"&&b!="n"&&b!="[]"}else a=!1;return a}function bn(a){a=l(a).clone();try{a.html("")}catch(b){}var c=3,d=l("<div>").append(a).html();try{return a[0].nodeType===c?g(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+g(b)})}catch(b){return g(d)}}function bo(a){try{return decodeURIComponent(a)}catch(b){}}function bp(a){var b={},c,d;return x((a||"").split("&"),function(a){if(a){c=a.split("="),d=bo(c[0]);if(K(d)){var e=K(c[1])?bo(c[1]):!0;b[d]?P(b[d])?b[d].push(e):b[d]=[b[d],e]:b[d]=e}}}),b}function bq(a){var b=[];return x(a,function(a,c){P(a)?x(a,function(a){b.push(bs(c,!0)+(a===!0?"":"="+bs(a,!0)))}):b.push(bs(c,!0)+(a===!0?"":"="+bs(a,!0)))}),b.length?b.join("&"):""}function br(a){return bs(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function bs(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,b?"%20":"+")}function bt(a,c){function i(a){a&&d.push(a)}var d=[a],e,f,g=["ng:app","ng-app","x-ng-app","data-ng-app"],h=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;x(g,function(c){g[c]=!0,i(b.getElementById(c)),c=c.replace(":","\\:"),a.querySelectorAll&&(x(a.querySelectorAll("."+c),i),x(a.querySelectorAll("."+c+"\\:"),i),x(a.querySelectorAll("["+c+"]"),i))}),x(d,function(a){if(!e){var b=" "+a.className+" ",c=h.exec(b);c?(e=a,f=(c[2]||"").replace(/\s+/g,",")):x(a.attributes,function(b){!e&&g[b.name]&&(e=a,f=b.value)})}}),e&&c(e,f?[f]:[])}function bu(c,d){var e=function(){c=l(c);if(c.injector()){var a=c[0]===b?"document":bn(c);throw q("btstrpd","App Already Bootstrapped with this Element '{0}'",a)}d=d||[],d.unshift(["$provide",function(a){a.value("$rootElement",c)}]),d.unshift("ng");var e=cn(d);return e.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",function(a,b,c,d,e){a.$apply(function(){b.data("$injector",d),c(b)(a)}),e.enabled(!0)}]),e},f=/^NG_DEFER_BOOTSTRAP!/;if(a&&!f.test(a.name))return e();a.name=a.name.replace(f,""),s.resumeBootstrap=function(a){x(a,function(a){d.push(a)}),e()}}function bw(a,b){return b=b||"_",a.replace(bv,function(a,c){return(c?b:"")+a.toLowerCase()})}function bx(){m=a.jQuery,m?(l=m,D(m.fn,{scope:ca.scope,controller:ca.controller,injector:ca.injector,inheritedData:ca.inheritedData}),bO("remove",!0,!0,!1),bO("empty",!1,!1,!1),bO("html",!1,!1,!0)):l=bP,s.element=l}function by(a,b,c){if(!a)throw q("areq","Argument '{0}' is {1}",b||"?",c||"required");return a}function bz(a,b,c){return c&&P(a)&&(a=a[a.length-1]),by(Q(a),b,"not a function, got "+(a&&typeof a=="object"?a.constructor.name||"Object":typeof a)),a}function bA(a,b,c){if(!b)return a;var d=b.split("."),e,f=a,g=d.length;for(var h=0;h<g;h++)e=d[h],a&&(a=(f=a)[e]);return!c&&Q(a)?bi(f,a):a}function bB(a){function b(a,b,c){return a[b]||(a[b]=c())}return b(b(a,"angular",Object),"module",function(){var a={};return function c(c,e,f){return e&&a.hasOwnProperty(c)&&(a[c]=null),b(a,c,function(){function i(b,c,d){return function(){return a[d||"push"]([b,c,arguments]),h}}if(!e)throw d("$injector")("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",c);var a=[],b=[],g=i("$injector","invoke"),h={_invokeQueue:a,_runBlocks:b,requires:e,name:c,provider:i("$provide","provider"),factory:i("$provide","factory"),service:i("$provide","service"),value:i("$provide","value"),constant:i("$provide","constant","unshift"),animation:i("$animateProvider","register"),filter:i("$filterProvider","register"),controller:i("$controllerProvider","register"),directive:i("$compileProvider","directive"),config:g,run:function(a){return b.push(a),this}};return f&&g(f),h})}})}function bD(b){D(b,{bootstrap:bu,copy:bd,extend:D,equals:bf,element:l,forEach:x,injector:cn,noop:G,bind:bi,toJson:bk,fromJson:bl,identity:H,isUndefined:J,isDefined:K,isString:M,isFunction:Q,isObject:L,isNumber:N,isElement:X,isArray:P,$$minErr:d,version:bC,isDate:O,lowercase:g,uppercase:h,callbacks:{counter:0}}),t=bB(a);try{t("ngLocale")}catch(c){t("ngLocale",[]).provider("$locale",cO)}t("ng",["ngLocale"],["$provide",function(a){a.provider("$compile",cw).directive({a:dZ,input:ep,textarea:ep,form:ec,script:eZ,select:e_,style:fb,option:fa,ngBind:eB,ngBindHtml:eD,ngBindTemplate:eC,ngClass:eF,ngClassEven:eH,ngClassOdd:eG,ngCsp:eK,ngCloak:eI,ngController:eJ,ngForm:ed,ngHide:eT,ngIf:eM,ngInclude:eN,ngInit:eO,ngNonBindable:eP,ngPluralize:eQ,ngRepeat:eR,ngShow:eS,ngStyle:eU,ngSwitch:eV,ngSwitchWhen:eW,ngSwitchDefault:eX,ngOptions:e$,ngTransclude:eY,ngModel:ev,ngList:ey,ngChange:ew,required:ex,ngRequired:ex,ngValue:eA}).directive(d$).directive(eL),a.provider({$anchorScroll:co,$animate:cq,$browser:cs,$cacheFactory:ct,$controller:cB,$document:cC,$exceptionHandler:cD,$filter:dE,$interpolate:cN,$http:cI,$httpBackend:cK,$location:de,$log:df,$parse:ds,$rootScope:dv,$q:dt,$sce:dz,$sceDelegate:dy,$sniffer:dA,$templateCache:cu,$timeout:dB,$window:dD,$$urlUtils:dC})}])}function bJ(){return++bG}function bN(a){return a.replace(bK,function(a,b,c,d){return d?c.toUpperCase():c}).replace(bL,"Moz$1")}function bO(a,b,c,d){function f(a){var f=c&&a?[this.filter(a)]:[this],g=b,h,i,j,k,n,o,p;if(!d||a!=null)while(f.length){h=f.shift();for(i=0,j=h.length;i<j;i++){k=l(h[i]),g?k.triggerHandler("$destroy"):g=!g;for(n=0,o=(p=k.children()).length;n<o;n++)f.push(m(p[n]))}}return e.apply(this,arguments)}var e=m.fn[a];e=e.$original||e,f.$original=e,m.fn[a]=f}function bP(a){if(a instanceof bP)return a;if(!(this instanceof bP)){if(M(a)&&a.charAt(0)!="<")throw bM("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new bP(a)}if(M(a)){var c=b.createElement("div");c.innerHTML="<div> </div>"+a,c.removeChild(c.firstChild),bZ(this,c.childNodes);var d=l(b.createDocumentFragment());d.append(this)}else bZ(this,a)}function bQ(a){return a.cloneNode(!0)}function bR(a){bT(a);for(var b=0,c=a.childNodes||[];b<c.length;b++)bR(c[b])}function bS(a,b,c,d){if(K(d))throw bM("offargs","jqLite#off() does not support the `selector` argument");var e=bU(a,"events"),f=bU(a,"handle");if(!f)return;J(b)?x(e,function(b,c){bI(a,c,b),delete e[c]}):x(b.split(" "),function(b){J(c)?(bI(a,b,e[b]),delete e[b]):bb(e[b]||[],c)})}function bT(a,b){var d=a[bF],e=bE[d];if(e){if(b){delete bE[d].data[b];return}e.handle&&(e.events.$destroy&&e.handle({},"$destroy"),bS(a)),delete bE[d],a[bF]=c}}function bU(a,b,c){var d=a[bF],e=bE[d||-1];if(K(c))e||(a[bF]=d=bJ(),e=bE[d]={}),e[b]=c;else return e&&e[b]}function bV(a,b,c){var d=bU(a,"data"),e=K(c),f=!e&&K(b),g=f&&!L(b);!d&&!g&&bU(a,"data",d={});if(e)d[b]=c;else{if(!f)return d;if(g)return d&&d[b];D(d,b)}}function bW(a,b){return(" "+a.className+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" ")>-1}function bX(a,b){b&&x(b.split(" "),function(b){a.className=W((" "+a.className+" ").replace(/[\n\t]/g," ").replace(" "+W(b)+" "," "))})}function bY(a,b){b&&x(b.split(" "),function(b){bW(a,b)||(a.className=W(a.className+" "+W(b)))})}function bZ(a,b){if(b){b=!b.nodeName&&K(b.length)&&!S(b)?b:[b];for(var c=0;c<b.length;c++)a.push(b[c])}}function b$(a,b){return b_(a,"$"+(b||"ngController")+"Controller")}function b_(a,b,d){a=l(a),a[0].nodeType==9&&(a=a.find("html"));while(a.length){if((d=a.data(b))!==c)return d;a=a.parent()}}function cd(a,b){var c=cb[b.toLowerCase()];return c&&cc[a.nodeName]&&c}function ce(a,c){var d=function(d,e){d.preventDefault||(d.preventDefault=function(){d.returnValue=!1}),d.stopPropagation||(d.stopPropagation=function(){d.cancelBubble=!0}),d.target||(d.target=d.srcElement||b);if(J(d.defaultPrevented)){var f=d.preventDefault;d.preventDefault=function(){d.defaultPrevented=!0,f.call(d)},d.defaultPrevented=!1}d.isDefaultPrevented=function(){return d.defaultPrevented||d.returnValue==0},x(c[e||d.type],function(b){b.call(a,d)}),k<=8?(d.preventDefault=null,d.stopPropagation=null,d.isDefaultPrevented=null):(delete d.preventDefault,delete d.stopPropagation,delete d.isDefaultPrevented)};return d.elem=a,d}function cf(a){var b=typeof a,d;return b=="object"&&a!==null?typeof (d=a.$$hashKey)=="function"?d=a.$$hashKey():d===c&&(d=a.$$hashKey=B()):d=a,b+":"+d}function cg(a){x(a,this.put,this)}function cm(a){var b,c,d,e;return typeof a=="function"?(b=a.$inject)||(b=[],a.length&&(c=a.toString().replace(ck,""),d=c.match(ch),x(d[1].split(ci),function(a){a.replace(cj,function(a,c,d){b.push(d)})})),a.$inject=b):P(a)?(e=a.length-1,bz(a[e],"fn"),b=a.slice(0,e)):bz(a,"fn",!0),b}function cn(a){function j(a){return function(b,c){if(L(b))x(b,A(a));else return a(b,c)}}function k(a,b){if(Q(b)||P(b))b=g.instantiate(b);if(!b.$get)throw cl("pget","Provider '{0}' must define $get factory method.",a);return f[a+c]=b}function l(a,b){return k(a,{$get:b})}function m(a,b){return l(a,["$injector",function(a){return a.instantiate(b)}])}function n(a,b){return l(a,I(b))}function o(a,b){f[a]=b,h[a]=b}function p(a,b){var d=g.get(a+c),e=d.$get;d.$get=function(){var a=i.invoke(e,d);return i.invoke(b,null,{$delegate:a})}}function q(a){var b=[];return x(a,function(a){if(e.get(a))return;e.put(a,!0);try{if(M(a)){var c=t(a);b=b.concat(q(c.requires)).concat(c._runBlocks);for(var d=c._invokeQueue,f=0,h=d.length;f<h;f++){var i=d[f],j=g.get(i[0]);j[i[1]].apply(j,i[2])}}else Q(a)?b.push(g.invoke(a)):P(a)?b.push(g.invoke(a)):bz(a,"module")}catch(k){throw P(a)&&(a=a[a.length-1]),k.message&&k.stack&&k.stack.indexOf(k.message)==-1&&(k=k.message+"\n"+k.stack),cl("modulerr","Failed to instantiate module {0} due to:\n{1}",a,k.stack||k.message||k)}}),b}function r(a,e){function g(c){if(a.hasOwnProperty(c)){if(a[c]===b)throw cl("cdep","Circular dependency found: {0}",d.join(" <- "));return a[c]}try{return d.unshift(c),a[c]=b,a[c]=e(c)}finally{d.shift()}}function h(a,b,c){var d=[],e=cm(a),f,h,i;for(h=0,f=e.length;h<f;h++){i=e[h];if(typeof i!="string")throw cl("itkn","Incorrect injection token! Expected service name as string, got {0}",i);d.push(c&&c.hasOwnProperty(i)?c[i]:g(i))}a.$inject||(a=a[f]);switch(b?-1:d.length){case 0:return a();case 1:return a(d[0]);case 2:return a(d[0],d[1]);case 3:return a(d[0],d[1],d[2]);case 4:return a(d[0],d[1],d[2],d[3]);case 5:return a(d[0],d[1],d[2],d[3],d[4]);case 6:return a(d[0],d[1],d[2],d[3],d[4],d[5]);case 7:return a(d[0],d[1],d[2],d[3],d[4],d[5],d[6]);case 8:return a(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7]);case 9:return a(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8]);case 10:return a(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9]);default:return a.apply(b,d)}}function i(a,b){var c=function(){},d,e;return c.prototype=(P(a)?a[a.length-1]:a).prototype,d=new c,e=h(a,d,b),L(e)?e:d}return{invoke:h,instantiate:i,get:g,annotate:cm,has:function(b){return f.hasOwnProperty(b+c)||a.hasOwnProperty(b)}}}var b={},c="Provider",d=[],e=new cg,f={$provide:{provider:j(k),factory:j(l),service:j(m),value:j(n),constant:j(o),decorator:p}},g=f.$injector=r(f,function(){throw cl("unpr","Unknown provider: {0}",d.join(" <- "))}),h={},i=h.$injector=r(h,function(a){var b=g.get(a+c);return i.invoke(b.$get,b)});return x(q(a),function(a){i.invoke(a||G)}),i}function co(){var a=!0;this.disableAutoScrolling=function(){a=!1},this.$get=["$window","$location","$rootScope",function(b,c,d){function f(a){var b=null;return x(a,function(a){!b&&g(a.nodeName)==="a"&&(b=a)}),b}function h(){var a=c.hash(),d;a?(d=e.getElementById(a))?d.scrollIntoView():(d=f(e.getElementsByName(a)))?d.scrollIntoView():a==="top"&&b.scrollTo(0,0):b.scrollTo(0,0)}var e=b.document;return a&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(h)}),h}]}function cr(a,b,d,e){function p(a){try{a.apply(null,bh(arguments,1))}finally{n--;if(n===0)while(o.length)try{o.pop()()}catch(b){d.error(b)}}}function s(a,b){(function c(){x(q,function(a){a()}),r=b(c,a)})()}function z(){if(t==f.url())return;t=f.url(),x(w,function(a){a(f.url())})}var f=this,g=b[0],h=a.location,i=a.history,j=a.setTimeout,k=a.clearTimeout,m={};f.isMock=!1;var n=0,o=[];f.$$completeOutstandingRequest=p,f.$$incOutstandingRequestCount=function(){n++},f.notifyWhenNoOutstandingRequests=function(a){x(q,function(a){a()}),n===0?a():o.push(a)};var q=[],r;f.addPollFn=function(a){return J(r)&&s(100,j),q.push(a),a};var t=h.href,u=b.find("base"),v=null;f.url=function(a,b){if(a){if(t==a)return;return t=a,e.history?b?i.replaceState(null,"",a):(i.pushState(null,"",a),u.attr("href",u.attr("href"))):b?(h.replace(a),v=a):(h.href=a,v=null),f}return v||h.href.replace(/%27/g,"'")};var w=[],y=!1;f.onUrlChange=function(b){return y||(e.history&&l(a).on("popstate",z),e.hashchange?l(a).on("hashchange",z):f.addPollFn(z),y=!0),w.push(b),b},f.baseHref=function(){var a=u.attr("href");return a?a.replace(/^https?\:\/\/[^\/]*/,""):""};var A={},B="",C=f.baseHref();f.cookies=function(a,b){var e,f,h,i,j;if(a)b===c?g.cookie=escape(a)+"=;path="+C+";expires=Thu, 01 Jan 1970 00:00:00 GMT":M(b)&&(e=(g.cookie=escape(a)+"="+escape(b)+";path="+C).length+1,e>4096&&d.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+e+" > 4096 bytes)!"));else{if(g.cookie!==B){B=g.cookie,f=B.split("; "),A={};for(i=0;i<f.length;i++){h=f[i],j=h.indexOf("=");if(j>0){var a=unescape(h.substring(0,j));A[a]===c&&(A[a]=unescape(h.substring(j+1)))}}}return A}},f.defer=function(a,b){var c;return n++,c=j(function(){delete m[c],p(a)},b||0),m[c]=!0,c},f.defer.cancel=function(a){return m[a]?(delete m[a],k(a),p(G),!0):!1}}function cs(){this.$get=["$window","$log","$sniffer","$document",function(a,b,c,d){return new cr(a,d,b,c)}]}function ct(){this.$get=function(){function b(b,c){function l(a){a!=j&&(k?k==a&&(k=a.n):k=a,m(a.n,a.p),m(a,j),j=a,j.n=null)}function m(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(b in a)throw d("$cacheFactory")("iid","CacheId '{0}' is already taken!",b);var e=0,f=D({},c,{id:b}),g={},h=c&&c.capacity||Number.MAX_VALUE,i={},j=null,k=null;return a[b]={put:function(a,b){var c=i[a]||(i[a]={key:a});l(c);if(J(b))return;return a in g||e++,g[a]=b,e>h&&this.remove(k.key),b},get:function(a){var b=i[a];if(!b)return;return l(b),g[a]},remove:function(a){var b=i[a];if(!b)return;b==j&&(j=b.p),b==k&&(k=b.n),m(b.n,b.p),delete i[a],delete g[a],e--},removeAll:function(){g={},e=0,i={},j=k=null},destroy:function(){g=null,f=null,i=null,delete a[b]},info:function(){return D({},f,{size:e})}}}var a={};return b.info=function(){var b={};return x(a,function(a,c){b[c]=a.info()}),b},b.get=function(b){return a[b]},b}}function cu(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function cw(a){var d={},e="Directive",f=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,g=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,h=/^\s*(https?|ftp|mailto|file):/,i=/^\s*(https?|ftp|file):|data:image\//,j=/^(on[a-z]*|formaction)$/;this.directive=function m(b,c){return M(b)?(by(c,"directiveFactory"),d.hasOwnProperty(b)||(d[b]=[],a.factory(b+e,["$injector","$exceptionHandler",function(a,c){var e=[];return x(d[b],function(d){try{var f=a.invoke(d);Q(f)?f={compile:I(f)}:!f.compile&&f.link&&(f.compile=I(f.link)),f.priority=f.priority||0,f.name=f.name||b,f.require=f.require||f.controller&&f.name,f.restrict=f.restrict||"A",e.push(f)}catch(g){c(g)}}),e}])),d[b].push(c)):x(b,A(m)),this},this.aHrefSanitizationWhitelist=function(a){return K(a)?(h=a,this):h},this.imgSrcSanitizationWhitelist=function(a){return K(a)?(i=a,this):i},this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$$urlUtils","$animate",function(a,m,n,o,p,q,r,s,t,v,w,y){function J(a,b,c,d){a instanceof l||(a=l(a)),x(a,function(b,c){b.nodeType==3&&b.nodeValue.match(/\S+/)&&(a[c]=b=l(b).wrap("<span></span>").parent()[0])});var e=N(a,b,a,c,d);return function f(b,c){by(b,"scope");var d=c?ca.clone.call(a):a;for(var f=0,g=d.length;f<g;f++){var h=d[f];(h.nodeType==1||h.nodeType==9)&&d.eq(f).data("$scope",b)}return K(d,"ng-scope"),c&&c(d,b),e&&e(b,d,d),d}}function K(a,b){try{a.addClass(b)}catch(c){}}function N(a,b,d,e,f){function o(a,d,e,f){var h,i,j,k,m,n,o,p,q=[];for(n=0,o=d.length;n<o;n++)q.push(d[n]);for(n=0,p=0,o=g.length;n<o;p++)j=q[p],h=g[n++],i=g[n++],h?(h.scope?(k=a.$new(L(h.scope)),l(j).data("$scope",k)):k=a,m=h.transclude,m||!f&&b?h(i,k,j,e,function(b){return function(c){var d=a.$new();return d.$$transcluded=!0,b(d,c).on("$destroy",bi(d,d.$destroy))}}(m||b)):h(i,k,j,c,f)):i&&i(a,j.childNodes,c,f)}var g=[],h,i,j,k,m;for(var n=0;n<a.length;n++)k=new z,j=O(a[n],[],k,n==0?e:c,f),h=j.length?T(j,a[n],k,b,d):null,i=h&&h.terminal||!a[n].childNodes||!a[n].childNodes.length?null:N(a[n].childNodes,h?h.transclude:b),g.push(h),g.push(i),m=m||h||i;return m?o:null}function O(a,b,c,d,e){var h=a.nodeType,i=c.$attr,j,l;switch(h){case 1:U(b,cy(u(a).toLowerCase()),"E",d,e);for(var m,n,o,p,q,r=a.attributes,s=0,t=r&&r.length;s<t;s++){var v,w,x;m=r[s];if(!k||k>=8||m.specified)n=m.name,p=cy(n),G.test(p)&&(n=p.substr(6).toLowerCase()),(x=p.lastIndexOf("Start"))!=-1&&x==p.length-5&&(v=n,w=n.substr(0,n.length-5)+"end",n=n.substr(0,n.length-6)),o=cy(n.toLowerCase()),i[o]=n,c[o]=q=W(k&&n=="href"?decodeURIComponent(a.getAttribute(n,2)):m.value),cd(a,o)&&(c[o]=!0),ba(a,b,q,o),U(b,o,"A",d,e,v,w)}l=a.className;if(M(l)&&l!=="")while(j=g.exec(l))o=cy(j[2]),U(b,o,"C",d,e)&&(c[o]=W(j[3])),l=l.substr(j.index+j[0].length);break;case 3:$(b,a.nodeValue);break;case 8:try{j=f.exec(a.nodeValue),j&&(o=cy(j[1]),U(b,o,"M",d,e)&&(c[o]=W(j[2])))}catch(y){}}return b.sort(Y),b}function R(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){var f=a;do{if(!a)throw cv("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",b,c);a.nodeType==1&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--),d.push(a),a=a.nextSibling}while(e>0)}else d.push(a);return l(d)}function S(a,b,c){return function(d,e,f,g){return e=R(e[0],b,c),a(d,e,f,g)}}function T(a,d,e,f,g,h){function Y(a,b,c,d){a&&(c&&(a=S(a,c,d)),a.require=u.require,j.push(a)),b&&(c&&(b=S(b,c,d)),b.require=u.require,k.push(b))}function $(a,b){var c,d="data",e=!1;if(M(a)){while((c=a.charAt(0))=="^"||c=="?")a=a.substr(1),c=="^"&&(d="inheritedData"),e=e||c=="?";c=b[d]("$"+a+"Controller");if(!c&&!e)throw cv("ctreq","Controller '{0}', required by directive '{1}', can't be found!",a,v);return c}return P(a)&&(c=[],x(a,function(a){c.push($(a,b))})),c}function _(a,b,f,g,h){var i,o,s,t,u,v;d===f?i=e:i=be(e,new z(l(f),e.$attr)),o=i.$$element;if(p){var w=/^\s*([@=&])(\??)\s*(\w*)\s*$/,y=b.$parent||b;x(p.scope,function(a,c){var d=a.match(w)||[],e=d[3]||c,f=d[2]=="?",g=d[1],h,j,k;b.$$isolateBindings[c]=g+e;switch(g){case"@":i.$observe(e,function(a){b[c]=a}),i.$$observers[e].$$scope=y,i[e]&&(b[c]=m(i[e])(y));break;case"=":if(f&&!i[e])return;j=q(i[e]),k=j.assign||function(){throw h=b[c]=j(y),cv("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",i[e],p.name)},h=b[c]=j(y),b.$watch(function(){var a=j(y);return a!==b[c]&&(a!==h?h=b[c]=a:k(y,a=h=b[c])),a});break;case"&":j=q(i[e]),b[c]=function(a){return j(y,a)};break;default:throw cv("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}",p.name,c,a)}})}C&&x(C,function(a){var c={$scope:b,$element:o,$attrs:i,$transclude:h},d;v=a.controller,v=="@"&&(v=i[a.name]),d=r(v,c),o.data("$"+a.name+"Controller",d),a.controllerAs&&(c.$scope[a.controllerAs]=d)});for(s=0,t=j.length;s<t;s++)try{u=j[s],u(b,o,i,u.require&&$(u.require,o))}catch(A){n(A,bn(o))}a&&a(b,f.childNodes,c,h);for(s=0,t=k.length;s<t;s++)try{u=k[s],u(b,o,i,u.require&&$(u.require,o))}catch(A){n(A,bn(o))}}var i=-Number.MAX_VALUE,j=[],k=[],o=null,p=null,s=null,t=e.$$element=l(d),u,v,w,y,A=h,B=f,C,D,F;for(var G=0,H=a.length;G<H;G++){u=a[G];var I=u.$$start,N=u.$$end;I&&(t=R(d,I,N)),w=c;if(i>u.priority)break;if(F=u.scope)Z("isolated scope",p,u,t),L(F)&&(K(t,"ng-isolate-scope"),p=u),K(t,"ng-scope"),o=o||u;v=u.name;if(F=u.controller)C=C||{},Z("'"+v+"' controller",C[v],u,t),C[v]=u;if(F=u.transclude)Z("transclusion",y,u,t),y=u,i=u.priority,F=="element"?(w=R(d,I,N),t=e.$$element=l(b.createComment(" "+v+": "+e[v]+" ")),d=t[0],bb(g,l(bh(w)),d),B=J(w,f,i,A&&A.name)):(w=l(bQ(d)).contents(),t.html(""),B=J(w,f));if(u.template){Z("template",s,u,t),s=u,F=Q(u.template)?u.template(t,e):u.template,F=E(F);if(u.replace){A=u,w=l("<div>"+W(F)+"</div>").contents(),d=w[0];if(w.length!=1||d.nodeType!==1)throw cv("tplrt","Template for directive '{0}' must have exactly one root element. {1}",v,"");bb(g,t,d);var T={$attr:{}};a=a.concat(O(d,a.splice(G+1,a.length-(G+1)),T)),V(e,T),H=a.length}else t.html(F)}if(u.templateUrl)Z("template",s,u,t),s=u,u.replace&&(A=u),_=X(a.splice(G,a.length-G),_,t,e,g,B),H=a.length;else if(u.compile)try{D=u.compile(t,e,B),Q(D)?Y(null,D,I,N):D&&Y(D.pre,D.post,I,N)}catch(U){n(U,bn(t))}u.terminal&&(_.terminal=!0,i=Math.max(i,u.priority))}return _.scope=o&&o.scope,_.transclude=y&&B,_}function U(b,f,g,h,i,j,k){if(f===i)return null;var l=null;if(d.hasOwnProperty(f))for(var m,o=a.get(f+e),p=0,q=o.length;p<q;p++)try{m=o[p],(h===c||h>m.priority)&&m.restrict.indexOf(g)!=-1&&(j&&(m=F(m,{$$start:j,$$end:k})),b.push(m),l=m)}catch(r){n(r)}return l}function V(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;x(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))}),x(b,function(b,f){f=="class"?(K(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):f=="style"?e.attr("style",e.attr("style")+";"+b):f.charAt(0)!="$"&&!a.hasOwnProperty(f)&&(a[f]=b,d[f]=c[f])})}function X(a,b,c,d,e,f){var g=[],h,i,j=c[0],k=a.shift(),m=D({},k,{controller:null,templateUrl:null,transclude:null,scope:null,replace:null}),n=Q(k.templateUrl)?k.templateUrl(c,d):k.templateUrl;return c.html(""),o.get(v.getTrustedResourceUrl(n),{cache:p}).success(function(o){var p,q,r;o=E(o);if(k.replace){r=l("<div>"+W(o)+"</div>").contents(),p=r[0];if(r.length!=1||p.nodeType!==1)throw cv("tplrt","Template for directive '{0}' must have exactly one root element. {1}",k.name,n);q={$attr:{}},bb(e,c,p),O(p,a,q),V(d,q)}else p=j,c.html(o);a.unshift(m),h=T(a,p,d,f,c,k),x(e,function(a,b){a==p&&(e[b]=c[0])}),i=N(c[0].childNodes,f);while(g.length){var s=g.shift(),t=g.shift(),u=g.shift(),v=g.shift(),w=c[0];t!==j&&(w=bQ(p),bb(u,l(t),w)),h(b(i,s,w,e,v),s,w,e,v)}g=null}).error(function(a,b,c,d){throw cv("tpload","Failed to load template: {0}",d.url)}),function(a,c,d,e,f){g?(g.push(c),g.push(d),g.push(e),g.push(f)):h(function(){b(i,c,d,e,f)},c,d,e,f)}}function Y(a,b){return b.priority-a.priority}function Z(a,b,c,d){if(b)throw cv("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",b.name,c.name,a,bn(d))}function $(a,b){var c=m(b,!0);c&&a.push({priority:0,compile:I(function d(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c),K(d.data("$binding",e),"ng-binding"),a.$watch(c,function(a){b[0].nodeValue=a})})})}function _(a,b){if(b=="xlinkHref"||u(a)!="IMG"&&(b=="src"||b=="ngSrc"))return v.RESOURCE_URL}function ba(a,b,c,d){var e=m(c,!0);if(!e)return;if(d==="multiple"&&u(a)==="SELECT")throw cv("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",bn(a));b.push({priority:100,compile:I(function f(b,c,f){var g=f.$$observers||(f.$$observers={});if(j.test(d))throw cv("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");e=m(f[d],!0,_(a,d));if(!e)return;f[d]=e(b),(g[d]||(g[d]=[])).$$inter=!0,(f.$$observers&&f.$$observers[d].$$scope||b).$watch(e,function(a){f.$set(d,a)})})})}function bb(a,c,d){var e=c[0],f=c.length,g=e.parentNode,h,i;if(a)for(h=0,i=a.length;h<i;h++)if(a[h]==e){a[h++]=d;for(var j=h,k=j+f-1,m=a.length;j<m;j++,k++)k<m?a[j]=a[k]:delete a[j];a.length-=f-1;break}g&&g.replaceChild(d,e);var n=b.createDocumentFragment();n.appendChild(e),d[l.expando]=e[l.expando];for(var o=1,p=c.length;o<p;o++){var q=c[o];l(q).remove(),n.appendChild(q),delete c[o]}c[0]=d,c.length=1}var z=function(a,b){this.$$element=a,this.$attr=b||{}};z.prototype={$normalize:cy,$addClass:function(a){a&&a.length>0&&y.addClass(this.$$element,a)},$removeClass:function(a){a&&a.length>0&&y.removeClass(this.$$element,a)},$set:function(a,b,d,e){function o(a,b){var c=[],d=a.split(/\s+/),e=b.split(/\s+/);f:for(var g=0;g<d.length;g++){var h=d[g];for(var i=0;i<e.length;i++)if(h==e[i])continue f;c.push(h)}return c}if(a=="class"){b=b||"";var f=this.$$element.attr("class")||"";this.$removeClass(o(f,b).join(" ")),this.$addClass(o(b,f).join(" "))}else{var g=cd(this.$$element[0],a),j,l;g&&(this.$$element.prop(a,b),e=g),this[a]=b,e?this.$attr[a]=e:(e=this.$attr[a],e||(this.$attr[a]=e=bw(a,"-"))),l=u(this.$$element);if(l==="A"&&a==="href"||l==="IMG"&&a==="src")if(!k||k>=8)j=w.resolve(b),j!==""&&(a==="href"&&!j.match(h)||a==="src"&&!j.match(i))&&(this[a]=b="unsafe:"+j);d!==!1&&(b===null||b===c?this.$$element.removeAttr(e):this.$$element.attr(e,b))}var m=this.$$observers;m&&x(m[a],function(a){try{a(b)}catch(c){n(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);return e.push(b),s.$evalAsync(function(){e.$$inter||b(c[a])}),b}};var A=t[0].createElement("a"),B=m.startSymbol(),C=m.endSymbol(),E=B=="{{"||C=="}}"?H:function(a){return a.replace(/\{\{/g,B).replace(/}}/g,C)},G=/^ngAttr[A-Z]/;return J}]}function cy(a){return bN(a.replace(cx,""))}function cz(a,b,c,d){}function cA(a,b,c,d,e){}function cB(){var a={},b=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(b,c){L(b)?D(a,b):a[b]=c},this.$get=["$injector","$window",function(c,e){return function(f,g){var h,i,j,k;M(f)&&(i=f.match(b),j=i[1],k=i[3],f=a.hasOwnProperty(j)?a[j]:bA(g.$scope,j,!0)||bA(e,j,!0),bz(f,j,!0)),h=c.instantiate(f,g);if(k){if(!g||typeof g.$scope!="object")throw d("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",j||f.name,k);g.$scope[k]=h}return h}}]}function cC(){this.$get=["$window",function(a){return l(a.document)}]}function cD(){this.$get=["$log",function(a){return function(b,c){a.error.apply(a,arguments)}}]}function cE(a){var b={},c,d,e;return a?(x(a.split("\n"),function(a){e=a.indexOf(":"),c=g(W(a.substr(0,e))),d=W(a.substr(e+1)),c&&(b[c]?b[c]+=", "+d:b[c]=d)}),b):b}function cF(a){var b=L(a)?a:c;return function(c){return b||(b=cE(a)),c?b[g(c)]||null:b}}function cG(a,b,c){return Q(c)?c(a,b):(x(c,function(c){a=c(a,b)}),a)}function cH(a){return 200<=a&&a<300}function cI(){var a=/^\s*(\[|\{[^\{])/,b=/[\}\]]\s*$/,d=/^\)\]\}',?\n/,e={"Content-Type":"application/json;charset=utf-8"},f=this.defaults={transformResponse:[function(c){return M(c)&&(c=c.replace(d,""),a.test(c)&&b.test(c)&&(c=bl(c))),c}],transformRequest:[function(a){return L(a)&&!U(a)?bk(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:e,put:e,patch:e},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},i=this.interceptors=[],j=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector","$$urlUtils",function(a,b,d,e,k,l,m){function p(a){function r(a){var b=D({},a,{data:cG(a.data,a.headers,d.transformResponse)});return cH(a.status)?b:k.reject(b)}function t(a){function j(a){var b;x(a,function(c,d){Q(c)&&(b=c(),b!=null?a[d]=b:delete a[d])})}var b=f.headers,c=D({},a.headers),d,e,h;b=D({},b.common,b[g(a.method)]),j(b),j(c);i:for(d in b){e=g(d);for(h in c)if(g(h)===e)continue i;c[d]=b[d]}return c}var d={transformRequest:f.transformRequest,transformResponse:f.transformResponse},e=t(a);D(d,a),d.headers=e,d.method=h(d.method);var i=m.isSameOrigin(d.url)?b.cookies()[d.xsrfCookieName||f.xsrfCookieName]:c;i&&(e[d.xsrfHeaderName||f.xsrfHeaderName]=i);var j=function(a){e=a.headers;var b=cG(a.data,cF(e),a.transformRequest);return J(a.data)&&x(e,function(a,b){g(b)==="content-type"&&delete e[b]}),J(a.withCredentials)&&!J(f.withCredentials)&&(a.withCredentials=f.withCredentials),s(a,b,e).then(r,r)},l=[j,c],n=k.when(d);x(o,function(a){(a.request||a.requestError)&&l.unshift(a.request,a.requestError),(a.response||a.responseError)&&l.push(a.response,a.responseError)});while(l.length){var p=l.shift(),q=l.shift();n=n.then(p,q)}return n.success=function(a){return n.then(function(b){a(b.data,b.status,b.headers,d)}),n},n.error=function(a){return n.then(null,function(b){a(b.data,b.status,b.headers,d)}),n},n}function q(a){x(arguments,function(a){p[a]=function(b,c){return p(D(c||{},{method:a,url:b}))}})}function r(a){x(arguments,function(a){p[a]=function(b,c,d){return p(D(d||{},{method:a,url:b,data:c}))}})}function s(b,c,d){function m(a,b,c){i&&(cH(a)?i.put(l,[a,b,cE(c)]):i.remove(l)),o(b,a,c),e.$$phase||e.$apply()}function o(a,c,d){c=Math.max(c,0),(cH(c)?g.resolve:g.reject)({data:a,status:c,headers:cF(d),config:b})}function q(){var a=ba(p.pendingRequests,b);a!==-1&&p.pendingRequests.splice(a,1)}var g=k.defer(),h=g.promise,i,j,l=t(b.url,b.params);p.pendingRequests.push(b),h.then(q,q),(b.cache||f.cache)&&b.cache!==!1&&b.method=="GET"&&(i=L(b.cache)?b.cache:L(f.cache)?f.cache:n);if(i){j=i.get(l);if(K(j)){if(j.then)return j.then(q,q),j;P(j)?o(j[1],j[0],bd(j[2])):o(j,200,{})}else i.put(l,h)}return J(j)&&a(b.method,l,c,m,d,b.timeout,b.withCredentials,b.responseType),h}function t(a,b){if(!b)return a;var d=[];return z(b,function(a,b){if(a==null||a==c)return;P(a)||(a=[a]),x(a,function(a){L(a)&&(a=bk(a)),d.push(bs(b)+"="+bs(a))})}),a+(a.indexOf("?")==-1?"?":"&")+d.join("&")}var n=d("$http"),o=[];return x(i,function(a){o.unshift(M(a)?l.get(a):l.invoke(a))}),x(j,function(a,b){var c=M(a)?l.get(a):l.invoke(a);o.splice(b,0,{response:function(a){return c(k.when(a))},responseError:function(a){return c(k.reject(a))}})}),p.pendingRequests=[],q("get","delete","head","jsonp"),r("post","put"),p.defaults=f,p}]}function cK(){this.$get=["$browser","$window","$document",function(a,b,c){return cL(a,cJ,a.defer,b.angular.callbacks,c[0],b.location.protocol.replace(":",""))}]}function cL(a,b,c,d,e,f){function h(a,b){var c=e.createElement("script"),d=function(){e.body.removeChild(c),b&&b()};return c.type="text/javascript",c.src=a,k?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=d,e.body.appendChild(c),d}return function(e,i,j,k,l,m,n,o){function u(){p=-1,r&&r(),s&&s.abort()}function v(b,d,e,g){var h=(i.match(cP)||["",f])[1];t&&c.cancel(t),r=s=null,d=h=="file"?e?200:404:d,d=d==1223?204:d,b(d,e,g),a.$$completeOutstandingRequest(G)}var p;a.$$incOutstandingRequestCount(),i=i||a.url();if(g(e)=="jsonp"){var q="_"+(d.counter++).toString(36);d[q]=function(a){d[q].data=a};var r=h(i.replace("JSON_CALLBACK","angular.callbacks."+q),function(){d[q].data?v(k,200,d[q].data):v(k,p||-2),delete d[q]})}else{var s=new b;s.open(e,i,!0),x(l,function(a,b){a&&s.setRequestHeader(b,a)}),s.onreadystatechange=function(){if(s.readyState==4){var a=s.getAllResponseHeaders(),b,c=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];a||(a="",x(c,function(b){var c=s.getResponseHeader(b);c&&(a+=b+": "+c+"\n")})),v(k,p||s.status,s.responseType?s.response:s.responseText,a)}},n&&(s.withCredentials=!0),o&&(s.responseType=o),s.send(j||"")}if(m>0)var t=c(u,m);else m&&m.then&&m.then(u)}}function cN(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a},this.endSymbol=function(a){return a?(b=a,this):b},this.$get=["$parse","$exceptionHandler","$sce",function(d,e,f){function i(i,j,k){var l,m,n=0,o=[],p=i.length,q=!1,r,s,t=[];while(n<p)(l=i.indexOf(a,n))!=-1&&(m=i.indexOf(b,l+g))!=-1?(n!=l&&o.push(i.substring(n,l)),o.push(r=d(s=i.substring(l+g,m))),r.exp=s,n=m+h,q=!0):(n!=p&&o.push(i.substring(n)),n=p);(p=o.length)||(o.push(""),p=1);if(k&&o.length>1)throw cM("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",i);if(!j||q)return t.length=p,r=function(a){try{for(var b=0,d=p,g;b<d;b++)typeof (g=o[b])=="function"&&(g=g(a),k?g=f.getTrusted(k,g):g=f.valueOf(g),g==null||g==c?g="":typeof g!="string"&&(g=bk(g))),t[b]=g;return t.join("")}catch(h){var j=cM("interr","Can't interpolate: {0}\n{1}",i,h.toString());e(j)}},r.exp=i,r.parts=o,r}var g=a.length,h=b.length;return i.startSymbol=function(){return a},i.endSymbol=function(){return b},i}]}function cO(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(a){return a===1?"one":"other"}}}}function cT(a){var b=a.split("/"),c=b.length;while(c--)b[c]=br(b[c]);return b.join("/")}function cU(a,b){var c=cP.exec(a);b.$$protocol=c[1],b.$$host=c[3],b.$$port=E(c[5])||cR[c[1]]||null}function cV(a,b){var c=cQ.exec(a);b.$$path=decodeURIComponent(c[1]),b.$$search=bp(c[3]),b.$$hash=decodeURIComponent(c[5]||""),b.$$path&&b.$$path.charAt(0)!="/"&&(b.$$path="/"+b.$$path)}function cW(a,b,c){return a+"://"+b+(c==cR[a]?"":":"+c)}function cX(a,b,c){return b.indexOf(a)==0?b.substr(a.length):c}function cY(a){var b=a.indexOf("#");return b==-1?a:a.substr(0,b)}function cZ(a){return a.substr(0,cY(a).lastIndexOf("/")+1)}function c$(a){return a.substring(0,a.indexOf("/",a.indexOf("//")+2))}function c_(a,b){this.$$html5=!0,b=b||"";var d=cZ(a);this.$$parse=function(a){var b={};cU(a,b);var c=cX(d,a);if(!M(c))throw cS("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',a,d);cV(c,b),D(this,b),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var a=bq(this.$$search),b=this.$$hash?"#"+br(this.$$hash):"";this.$$url=cT(this.$$path)+(a?"?"+a:"")+b,this.$$absUrl=d+this.$$url.substr(1)},this.$$rewrite=function(e){var f,g;if((f=cX(a,e))!==c)return g=f,(f=cX(b,f))!==c?d+(cX("/",f)||f):a+g;if((f=cX(d,e))!==c)return d+f;if(d==e+"/")return d}}function da(a,b){var c=cZ(a);cU(a,this),this.$$parse=function(d){var e=cX(a,d)||cX(c,d),f=e.charAt(0)=="#"?cX(b,e):this.$$html5?e:"";if(!M(f))throw cS("ihshprfx",'Invalid url "{0}", missing hash prefix "{1}".',d,b);cV(f,this),this.$$compose()},this.$$compose=function(){var c=bq(this.$$search),d=this.$$hash?"#"+br(this.$$hash):"";this.$$url=cT(this.$$path)+(c?"?"+c:"")+d,this.$$absUrl=a+(this.$$url?b+this.$$url:"")},this.$$rewrite=function(b){if(cY(a)==cY(b))return b}}function db(a,b){this.$$html5=!0,da.apply(this,arguments);var c=cZ(a);this.$$rewrite=function(d){var e;if(a==cY(d))return d;if(e=cX(c,d))return a+b+e;if(c===d+"/")return c}}function dc(a){return function(){return this[a]}}function dd(a,b){return function(c){return J(c)?this[a]:(this[a]=b(c),this.$$compose(),this)}}function de(){var b="",c=!1;this.hashPrefix=function(a){return K(a)?(b=a,this):b},this.html5Mode=function(a){return K(a)?(c=a,this):c},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(d,e,f,h){function p(a){d.$broadcast("$locationChangeSuccess",i.absUrl(),a)}var i,j,k=e.baseHref(),m=e.url(),n;c?(n=c$(m)+(k||"/"),j=f.history?c_:db):(n=cY(m),j=da),i=new j(n,"#"+b),i.$$parse(i.$$rewrite(m)),h.on("click",function(b){if(b.ctrlKey||b.metaKey||b.which==2)return;var c=l(b.target);while(g(c[0].nodeName)!=="a")if(c[0]===h[0]||!(c=c.parent())[0])return;var f=c.prop("href"),j=i.$$rewrite(f);f&&!c.attr("target")&&j&&!b.isDefaultPrevented()&&(b.preventDefault(),j!=e.url()&&(i.$$parse(j),d.$apply(),a.angular["ff-684208-preventDefault"]=!0))}),i.absUrl()!=m&&e.url(i.absUrl(),!0),e.onUrlChange(function(a){if(i.absUrl()!=a){if(d.$broadcast("$locationChangeStart",a,i.absUrl()).defaultPrevented){e.url(i.absUrl());return}d.$evalAsync(function(){var b=i.absUrl();i.$$parse(a),p(b)}),d.$$phase||d.$digest()}});var o=0;return d.$watch(function(){var a=e.url(),b=i.$$replace;if(!o||a!=i.absUrl())o++,d.$evalAsync(function(){d.$broadcast("$locationChangeStart",i.absUrl(),a).defaultPrevented?i.$$parse(a):(e.url(i.absUrl(),b),p(a))});return i.$$replace=!1,o}),i}]}function df(){var a=!0,b=this;this.debugEnabled=function(b){return K(b)?(a=b,this):a},this.$get=["$window",function(c){function d(a){return a instanceof Error&&(a.stack?a=a.message&&a.stack.indexOf(a.message)===-1?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line)),a}function e(a){var b=c.console||{},e=b[a]||b.log||G;return e.apply?function(){var a=[];return x(arguments,function(b){a.push(d(b))}),e.apply(b,a)}:function(a,b){e(a,b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function dh(a,b){if(a==="constructor")throw dg("isecfld",'Referencing "constructor" field in Angular expressions is disallowed! Expression: {0}',b);return a}function di(a,b){if(a&&a.constructor===a)throw dg("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",b);return a}function dl(a,b){function o(a){return a.indexOf(h)!=-1}function p(a){return a.indexOf(i)!=-1}function q(b){var c=b||1;return e+c<a.length?a.charAt(e+c):!1}function r(a){return"0"<=a&&a<="9"}function s(a){return a==" "||a=="\r"||a=="\t"||a=="\n"||a==""||a==" "}function t(a){return"a"<=a&&a<="z"||"A"<=a&&a<="Z"||"_"==a||a=="$"}function u(a){return a=="-"||a=="+"||r(a)}function v(b,c,d){d=d||e;var f=K(c)?"s "+c+"-"+e+" ["+a.substring(c,d)+"]":" "+d;throw dg("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",b,f,a)}function w(){var b="",d=e;while(e<a.length){var f=g(a.charAt(e));if(f=="."||r(f))b+=f;else{var h=q();if(f=="e"&&u(h))b+=f;else if(u(f)&&h&&r(h)&&b.charAt(b.length-1)=="e")b+=f;else if(u(f)&&(!h||!r(h))&&b.charAt(b.length-1)=="e")v("Invalid exponent");else break}e++}b=1*b,c.push({index:d,text:b,json:!0,fn:function(){return b}})}function x(){var d="",f=e,g,h,i,j;while(e<a.length){j=a.charAt(e);if(j=="."||t(j)||r(j))j=="."&&(g=e),d+=j;else break;e++}if(g){h=e;while(h<a.length){j=a.charAt(h);if(j=="("){i=d.substr(g-f+1),d=d.substr(0,g-f),e=h;break}if(s(j))h++;else break}}var k={index:f,text:d};if(dj.hasOwnProperty(d))k.fn=k.json=dj[d];else{var l=dr(d,b,a);k.fn=D(function(a,b){return l(a,b)},{assign:function(b,c){return dn(b,d,c,a)}})}c.push(k),i&&(c.push({index:g,text:".",json:!1}),c.push({index:g+1,text:i,json:!1}))}function y(b){var d=e;e++;var f="",g=b,h=!1;while(e<a.length){var i=a.charAt(e);g+=i;if(h){if(i=="u"){var j=a.substring(e+1,e+5);j.match(/[\da-f]{4}/i)||v("Invalid unicode escape [\\u"+j+"]"),e+=4,f+=String.fromCharCode(parseInt(j,16))}else{var k=dk[i];k?f+=k:f+=i}h=!1}else if(i=="\\")h=!0;else{if(i==b){e++,c.push({index:d,text:g,string:f,json:!0,fn:function(){return f}});return}f+=i}e++}v("Unterminated quote",d)}var c=[],d,e=0,f=[],h,i=":";while(e<a.length){h=a.charAt(e);if(o("\"'"))y(h);else if(r(h)||o(".")&&r(q()))w();else if(t(h))x(),p("{,")&&f[0]=="{"&&(d=c[c.length-1])&&(d.json=d.text.indexOf(".")==-1);else if(o("(){}[].,;:?"))c.push({index:e,text:h,json:p(":[,")&&o("{[")||o("}]:,")}),o("{[")&&f.unshift(h),o("}]")&&f.shift(),e++;else{if(s(h)){e++;continue}var j=h+q(),k=j+q(2),l=dj[h],m=dj[j],n=dj[k];n?(c.push({index:e,text:k,fn:n}),e+=3):m?(c.push({index:e,text:j,fn:m}),e+=2):l?(c.push({index:e,text:h,fn:l,json:p("[,:")&&o("+-")}),e+=1):v("Unexpected next character ",e,e+1)}i=h}return c}function dm(a,b,d,e){function n(b,c){throw dg("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",c.text,b,c.index+1,a,a.substring(c.index))}function o(){if(h.length===0)throw dg("ueoe","Unexpected end of expression: {0}",a);return h[0]}function p(a,b,c,d){if(h.length>0){var e=h[0],f=e.text;if(f==a||f==b||f==c||f==d||!a&&!b&&!c&&!d)return e}return!1}function q(a,c,d,e){var f=p(a,c,d,e);return f?(b&&!f.json&&n("is not valid json",f),h.shift(),f):!1}function r(a){q(a)||n("is unexpected, expecting ["+a+"]",p())}function s(a,b){return D(function(c,d){return a(c,d,b)},{constant:b.constant})}function t(a,b,c){return D(function(d,e){return a(d,e)?b(d,e):c(d,e)},{constant:a.constant&&b.constant&&c.constant})}function u(a,b,c){return D(function(d,e){return b(d,e,a,c)},{constant:a.constant&&c.constant})}function v(){var a=[];for(;;){h.length>0&&!p("}",")",";","]")&&a.push(m());if(!q(";"))return a.length==1?a[0]:function(b,c){var d;for(var e=0;e<a.length;e++){var f=a[e];f&&(d=f(b,c))}return d}}}function w(){var a=y(),b;for(;;)if(b=q("|"))a=u(a,b.fn,x());else return a}function x(){var a=q(),b=d(a.text),c=[];for(;;)if(a=q(":"))c.push(y());else{var e=function(a,d,e){var f=[e];for(var g=0;g<c.length;g++)f.push(c[g](a,d));return b.apply(a,f)};return function(){return e}}}function y(){return i()}function z(){var b=A(),c,d;return(d=q("="))?(b.assign||n("implies assignment but ["+a.substring(0,d.index)+"] can not be assigned to",d),c=A(),function(a,d){return b.assign(a,c(a,d),d)}):b}function A(){var a=B(),b,c;if(!(c=q("?")))return a;b=A();if(c=q(":"))return t(a,b,A());n("expected :",c)}function B(){var a=C(),b;for(;;)if(b=q("||"))a=u(a,b.fn,C());else return a}function C(){var a=E(),b;if(b=q("&&"))a=u(a,b.fn,C());return a}function E(){var a=F(),b;if(b=q("==","!=","===","!=="))a=u(a,b.fn,E());return a}function F(){var a=H(),b;if(b=q("<",">","<=",">="))a=u(a,b.fn,F());return a}function H(){var a=J(),b;while(b=q("+","-"))a=u(a,b.fn,J());return a}function J(){var a=K(),b;while(b=q("*","/","%"))a=u(a,b.fn,K());return a}function K(){var a;return q("+")?L():(a=q("-"))?u(f,a.fn,K()):(a=q("!"))?s(a.fn,K()):L()}function L(){var a;if(q("("))a=m(),r(")");else if(q("["))a=P();else if(q("{"))a=Q();else{var b=q();a=b.fn,a||n("not a primary expression",b),b.json&&(a.constant=a.literal=!0)}var c,d;while(c=q("(","[","."))c.text==="("?(a=j(a,d),d=null):c.text==="["?(d=a,a=l(a)):c.text==="."?(d=a,a=k(a)):n("IMPOSSIBLE");return a}function M(b){var c=q().text,d=dr(c,e,a);return D(function(a,c,e){return d(e||b(a,c),c)},{assign:function(d,e,f){return dn(b(d,f),c,e,a)}})}function N(b){var d=y();return r("]"),D(function(e,f){var g=b(e,f),h=d(e,f),i,j;return g?(i=di(g[h],a),i&&i.then&&(j=i,"$$v"in i||(j.$$v=c,j.then(function(a){j.$$v=a})),i=i.$$v),i):c},{assign:function(c,e,f){var g=d(c,f);return di(b(c,f),a)[g]=e}})}function O(a,b){var d=[];if(o().text!=")")do d.push(y());while(q(","));return r(")"),function(e,f){var g=[],h=b?b(e,f):e;for(var i=0;i<d.length;i++)g.push(d[i](e,f));var j=a(e,f,h)||G,k=j.apply?j.apply(h,g):j(g[0],g[1],g[2],g[3],g[4]);if(k&&k.then){var l=k;"$$v"in k||(l.$$v=c,l.then(function(a){l.$$v=a})),k=k.$$v}return k}}function P(){var a=[],b=!0;if(o().text!="]")do{var c=y();a.push(c),c.constant||(b=!1)}while(q(","));return r("]"),D(function(b,c){var d=[];for(var e=0;e<a.length;e++)d.push(a[e](b,c));return d},{literal:!0,constant:b})}function Q(){var a=[],b=!0;if(o().text!="}")do{var c=q(),d=c.string||c.text;r(":");var e=y();a.push({key:d,value:e}),e.constant||(b=!1)}while(q(","));return r("}"),D(function(b,c){var d={};for(var e=0;e<a.length;e++){var f=a[e];d[f.key]=f.value(b,c)}return d},{literal:!0,constant:b})}var f=I(0),g,h=dl(a,e),i=z,j=O,k=M,l=N,m=w;return b?(i=B,j=k=l=m=function(){n("is not valid json",{text:a,index:0})},g=L()):g=v(),h.length!==0&&n("is an unexpected token",h[0]),g.literal=!!g.literal,g.constant=!!g.constant,g}function dn(a,b,d,e){var f=b.split("."),g;for(var h=0;f.length>1;h++){g=dh(f.shift(),e);var i=a[g];i||(i={},a[g]=i),a=i,a.then&&("$$v"in a||function(a){a.then(function(b){a.$$v=b})}(a),a.$$v===c&&(a.$$v={}),a=a.$$v)}return g=dh(f.shift(),e),a[g]=d,d}function dq(a,b,d,e,f,g){return dh(a,g),dh(b,g),dh(d,g),dh(e,g),dh(f,g),function(g,h){var i=h&&h.hasOwnProperty(a)?h:g,j;return i===null||i===c?i:(i=i[a],i&&i.then&&("$$v"in i||(j=i,j.$$v=c,j.then(function(a){j.$$v=a})),i=i.$$v),!b||i===null||i===c?i:(i=i[b],i&&i.then&&("$$v"in i||(j=i,j.$$v=c,j.then(function(a){j.$$v=a})),i=i.$$v),!d||i===null||i===c?i:(i=i[d],i&&i.then&&("$$v"in i||(j=i,j.$$v=c,j.then(function(a){j.$$v=a})),i=i.$$v),!e||i===null||i===c?i:(i=i[e],i&&i.then&&("$$v"in i||(j=i,j.$$v=c,j.then(function(a){j.$$v=a})),i=i.$$v),!f||i===null||i===c?i:(i=i[f],i&&i.then&&("$$v"in i||(j=i,j.$$v=c,j.then(function(a){j.$$v=a})),i=i.$$v),i)))))}}function dr(a,b,d){if(dp.hasOwnProperty(a))return dp[a];var e=a.split("."),f=e.length,g;if(b)g=f<6?dq(e[0],e[1],e[2],e[3],e[4],d):function(a,b){var g=0,h;do h=dq(e[g++],e[g++],e[g++],e[g++],e[g++],d)(a,b),b=c,a=h;while(g<f);return h};else{var h="var l, fn, p;\n";x(e,function(a,b){dh(a,d),h+="if(s === null || s === undefined) return s;\nl=s;\ns="+(b?"s":'((k&&k.hasOwnProperty("'+a+'"))?k:s)')+'["'+a+'"]'+";\n"+"if (s && s.then) {\n"+' if (!("$$v" in s)) {\n'+" p=s;\n"+" p.$$v = undefined;\n"+" p.then(function(v) {p.$$v=v;});\n"+"}\n"+" s=s.$$v\n"+"}\n"}),h+="return s;",g=Function("s","k",h),g.toString=function(){return h}}return dp[a]=g}function ds(){var a={};this.$get=["$filter","$sniffer",function(b,c){return function(d){switch(typeof d){case"string":return a.hasOwnProperty(d)?a[d]:a[d]=dm(d,!1,b,c.csp);case"function":return d;default:return G}}}]}function dt(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return du(function(b){a.$evalAsync(b)},b)}]}function du(a,b){function h(a){return a}function i(a){return f(a)}function j(a){var b=d(),c=0,f=P(a)?[]:{};return x(a,function(a,d){c++,e(a).then(function(a){if(f.hasOwnProperty(d))return;f[d]=a,--c||b.resolve(f)},function(a){if(f.hasOwnProperty(d))return;b.reject(a)})}),c===0&&b.resolve(f),b.promise}var d=function(){var g=[],j,k;return k={resolve:function(b){if(g){var d=g;g=c,j=e(b),d.length&&a(function(){var a;for(var b=0,c=d.length;b<c;b++)a=d[b],j.then(a[0],a[1],a[2])})}},reject:function(a){k.resolve(f(a))},notify:function(b){if(g){var c=g;g.length&&a(function(){var a;for(var d=0,e=c.length;d<e;d++)a=c[d],a[2](b)})}},promise:{then:function(a,c,e){var f=d(),k=function(c){try{f.resolve((Q(a)?a:h)(c))}catch(d){f.reject(d),b(d)}},l=function(a){try{f.resolve((Q(c)?c:i)(a))}catch(d){f.reject(d),b(d)}},m=function(a){try{f.notify((Q(e)?e:h)(a))}catch(c){b(c)}};return g?g.push([k,l,m]):j.then(k,l,m),f.promise},"catch":function(a){return this.then(null,a)},"finally":function(a){function b(a,b){var c=d();return b?c.resolve(a):c.reject(a),c.promise}function c(c,d){var e=null;try{e=(a||h)()}catch(f){return b(f,!1)}return e&&Q(e.then)?e.then(function(){return b(c,d)},function(a){return b(a,!1)}):b(c,d)}return this.then(function(a){return c(a,!0)},function(a){return c(a,!1)})}}},k},e=function(b){return b&&Q(b.then)?b:{then:function(c){var e=d();return a(function(){e.resolve(c(b))}),e.promise}}},f=function(c){return{then:function(e,f){var g=d();return a(function(){try{g.resolve((Q(f)?f:i)(c))}catch(a){g.reject(a),b(a)}}),g.promise}}},g=function(c,g,j,k){var l=d(),m,n=function(a){try{return(Q(g)?g:h)(a)}catch(c){return b(c),f(c)}},o=function(a){try{return(Q(j)?j:i)(a)}catch(c){return b(c),f(c)}},p=function(a){try{return(Q(k)?k:h)(a)}catch(c){b(c)}};return a(function(){e(c).then(function(a){if(m)return;m=!0,l.resolve(e(a).then(n,o,p))},function(a){if(m)return;m=!0,l.resolve(o(a))},function(a){if(m)return;l.notify(p(a))})}),l.promise};return{defer:d,reject:f,when:g,all:j}}function dv(){var a=10,b=d("$rootScope");this.digestTtl=function(b){return arguments.length&&(a=b),a},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(c,d,e,f){function g(){this.$id=B(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this["this"]=this.$root=this,this.$$destroyed=!1,this.$$asyncQueue=[],this.$$postDigestQueue=[],this.$$listeners={},this.$$isolateBindings={}}function i(a){if(h.$$phase)throw b("inprog","{0} already in progress",h.$$phase);h.$$phase=a}function j(){h.$$phase=null}function k(a,b){var c=e(a);return bz(c,b),c}function l(){}g.prototype={constructor:g,$new:function(a){var b,c;return a?(c=new g,c.$root=this.$root,c.$$asyncQueue=this.$$asyncQueue,c.$$postDigestQueue=this.$$postDigestQueue):(b=function(){},b.prototype=this,c=new b,c.$id=B()),c["this"]=c,c.$$listeners={},c.$parent=this,c.$$watchers=c.$$nextSibling=c.$$childHead=c.$$childTail=null,c.$$prevSibling=this.$$childTail,this.$$childHead?(this.$$childTail.$$nextSibling=c,this.$$childTail=c):this.$$childHead=this.$$childTail=c,c},$watch:function(a,b,c){var d=this,e=k(a,"watch"),f=d.$$watchers,g={fn:b,last:l,get:e,exp:a,eq:!!c};if(!Q(b)){var h=k(b||G,"listener");g.fn=function(a,b,c){h(c)}}if(typeof a=="string"&&e.constant){var i=g.fn;g.fn=function(a,b,c){i.call(this,a,b,c),bb(f,g)}}return f||(f=d.$$watchers=[]),f.unshift(g),function(){bb(f,g)}},$watchCollection:function(a,b){function l(){f=h(c);var a,b;if(!L(f))d!==f&&(d=f,g++);else if(w(f)){d!==i&&(d=i,k=d.length=0,g++),a=f.length,k!==a&&(g++,d.length=k=a);for(var e=0;e<a;e++)d[e]!==f[e]&&(g++,d[e]=f[e])}else{d!==j&&(d=j={},k=0,g++),a=0;for(b in f)f.hasOwnProperty(b)&&(a++,d.hasOwnProperty(b)?d[b]!==f[b]&&(g++,d[b]=f[b]):(k++,d[b]=f[b],g++));if(k>a){g++;for(b in d)d.hasOwnProperty(b)&&!f.hasOwnProperty(b)&&(k--,delete d[b])}}return g}function m(){b(f,d,c)}var c=this,d,f,g=0,h=e(a),i=[],j={},k=0;return this.$watch(l,m)},$digest:function(){var c,e,f,g,h=this.$$asyncQueue,k=this.$$postDigestQueue,m,n,o=a,p,q,r=this,s=[],t,u;i("$digest");do{n=!1,q=r;while(h.length)try{q.$eval(h.shift())}catch(v){d(v)}do{if(g=q.$$watchers){m=g.length;while(m--)try{c=g[m],c&&(e=c.get(q))!==(f=c.last)&&!(c.eq?bf(e,f):typeof e=="number"&&typeof f=="number"&&isNaN(e)&&isNaN(f))&&(n=!0,c.last=c.eq?bd(e):e,c.fn(e,f===l?e:f,q),o<5&&(t=4-o,s[t]||(s[t]=[]),u=Q(c.exp)?"fn: "+(c.exp.name||c.exp.toString()):c.exp,u+="; newVal: "+bk(e)+"; oldVal: "+bk(f),s[t].push(u)))}catch(v){d(v)}}if(!(p=q.$$childHead||q!==r&&q.$$nextSibling))while(q!==r&&!(p=q.$$nextSibling))q=q.$parent}while(q=p);if(n&&!(o--))throw j(),b("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",a,bk(s))}while(n||h.length);j();while(k.length)try{k.shift()()}catch(v){d(v)}},$destroy:function(){if(h==this||this.$$destroyed)return;var a=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a.$$childTail==this&&(a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null},$eval:function(a,b){return e(a)(this,b)},$evalAsync:function(a){!h.$$phase&&!h.$$asyncQueue.length&&f.defer(function(){h.$$asyncQueue.length&&h.$digest()}),this.$$asyncQueue.push(a)},$$postDigest:function(a){this.$$postDigestQueue.push(a)},$apply:function(a){try{return i("$apply"),this.$eval(a)}catch(b){d(b)}finally{j();try{h.$digest()}catch(b){throw d(b),b}}},$on:function(a,b){var c=this.$$listeners[a];return c||(this.$$listeners[a]=c=[]),c.push(b),function(){c[ba(c,b)]=null}},$emit:function(a,b){var c=[],e,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},i=bg([h],arguments,1),j,k;do{e=f.$$listeners[a]||c,h.currentScope=f;for(j=0,k=e.length;j<k;j++){if(!e[j]){e.splice(j,1),j--,k--;continue}try{e[j].apply(null,i);if(g)return h}catch(l){d(l)}}f=f.$parent}while(f);return h},$broadcast:function(a,b){var c=this,e=c,f=c,g={name:a,targetScope:c,preventDefault:function(){g.defaultPrevented=!0},defaultPrevented:!1},h=bg([g],arguments,1),i,j,k;do{e=f,g.currentScope=e,i=e.$$listeners[a]||[];for(j=0,k=i.length;j<k;j++){if(!i[j]){i.splice(j,1),j--,k--;continue}try{i[j].apply(null,h)}catch(l){d(l)}}if(!(f=e.$$childHead||e!==c&&e.$$nextSibling))while(e!==c&&!(f=e.$$nextSibling))e=e.$parent}while(e=f);return g}};var h=new g;return h}]}function dy(){function d(a,b){return a===b||a==="http:"&&b==="https:"}this.SCE_CONTEXTS=dx;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){return arguments.length&&(a=b),a},this.resourceUrlBlacklist=function(a){return arguments.length&&(b=a),b},this.$get=["$log","$document","$injector","$$urlUtils",function(d,e,f,g){function i(a,b){return a==="self"?g.isSameOrigin(b):!!b.href.match(a)}function j(c){var d=g.resolve(c.toString(),!0),e,f,h=!1;for(e=0,f=a.length;e<f;e++)if(i(a[e],d)){h=!0;break}if(h)for(e=0,f=b.length;e<f;e++)if(i(b[e],d)){h=!1;break}return h}function k(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};return a&&(b.prototype=new a),b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},b}function n(a,b){var d=m.hasOwnProperty(a)?m[a]:null;if(!d)throw dw("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",a,b);if(b===null||b===c||b==="")return b;if(typeof b!="string")throw dw("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",a);return new d(b)}function o(a){return a instanceof l?a.$$unwrapTrustedValue():a}function p(a,b){if(b===null||b===c||b==="")return b;var d=m.hasOwnProperty(a)?m[a]:null;if(d&&b instanceof d)return b.$$unwrapTrustedValue();if(a===dx.RESOURCE_URL){if(j(b))return b;throw dw("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",b.toString())}if(a===dx.HTML)return h(b);throw dw("unsafe","Attempting to use an unsafe value in a safe context.")}var h=function(a){throw dw("unsafe","Attempting to use an unsafe value in a safe context.")};f.has("$sanitize")&&(h=f.get("$sanitize"));var l=k(),m={};return m[dx.HTML]=k(l),m[dx.CSS]=k(l),m[dx.URL]=k(l),m[dx.JS]=k(l),m[dx.RESOURCE_URL]=k(m[dx.URL]),{trustAs:n,getTrusted:p,valueOf:o}}]}function dz(){var a=!0;this.enabled=function(b){return arguments.length&&(a=!!b),a},this.$get=["$parse","$document","$sceDelegate",function(b,d,e){if(a&&k){var f=d[0].documentMode;if(f!==c&&f<8)throw dw("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.")}var h=bd(dx);h.isEnabled=function(){return a},h.trustAs=e.trustAs,h.getTrusted=e.getTrusted,h.valueOf=e.valueOf,a||(h.trustAs=h.getTrusted=function(a,b){return b},h.valueOf=H),h.parseAs=function(a,c){var d=b(c);return d.literal&&d.constant?d:function(b,c){return h.getTrusted(a,d(b,c))}};var i=h.parseAs,j=h.getTrusted,l=h.trustAs;return s.forEach(dx,function(a,b){var c=g(b);h[bN("parse_as_"+c)]=function(b){return i(a,b)},h[bN("get_trusted_"+c)]=function(b){return j(a,b)},h[bN("trust_as_"+c)]=function(b){return l(a,b)}}),h}]}function dA(){this.$get=["$window","$document",function(a,b){var c={},d=E((/android (\d+)/.exec(g((a.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((a.navigator||{}).userAgent),f=b[0]||{},h,i=/^(Moz|webkit|O|ms)(?=[A-Z])/,j=f.body&&f.body.style,l=!1,m=!1,n;if(j){for(var o in j)if(n=i.exec(o)){h=n[0],h=h.substr(0,1).toUpperCase()+h.substr(1);break}h||(h="WebkitOpacity"in j&&"webkit"),l="transition"in j||h+"Transition"in j,m="animation"in j||h+"Animation"in j,d&&(!l||!m)&&(l=M(f.body.style.webkitTransition),m=M(f.body.style.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||d<4)&&!e,hashchange:"onhashchange"in a&&(!f.documentMode||f.documentMode>7),hasEvent:function(a){if(a=="input"&&k==9)return!1;if(J(c[a])){var b=f.createElement("div");c[a]="on"+a in b}return c[a]},csp:f.securityPolicy?f.securityPolicy.isActive:!1,vendorPrefix:h,transitions:l,animations:m}}]}function dB(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(a,b,c,d){function f(f,g,h){var i=c.defer(),j=i.promise,k=K(h)&&!h,l;return l=b.defer(function(){try{i.resolve(f())}catch(b){i.reject(b),d(b)}finally{delete e[j.$$timeoutId]}k||a.$apply()},g),j.$$timeoutId=l,e[l]=i,j}var e={};return f.cancel=function(a){return a&&a.$$timeoutId in e?(e[a.$$timeoutId].reject("canceled"),delete e[a.$$timeoutId],b.defer.cancel(a.$$timeoutId)):!1},f}]}function dC(){this.$get=[function(){function e(a,b){var d=a;return k<=11&&(c.setAttribute("href",d),d=c.href),c.setAttribute("href",d),b?{href:c.href,protocol:c.protocol,host:c.host}:c.href}var c=b.createElement("a"),d=e(a.location.href,!0);return{resolve:e,isSameOrigin:function(a){var b=typeof a=="string"?e(a,!0):a;return b.protocol===d.protocol&&b.host===d.host}}}]}function dD(){this.$get=I(a)}function dE(a){function c(c,d){return a.factory(c+b,d)}var b="Filter";this.register=c,this.$get=["$injector",function(a){return function(c){return a.get(c+b)}}],c("currency",dG),c("date",dS),c("filter",dF),c("json",dT),c("limitTo",dW),c("lowercase",dU),c("number",dH),c("orderBy",dX),c("uppercase",dV)}function dF(){return function(a,b,c){if(!P(a))return a;var d=[];d.check=function(a){for(var b=0;b<d.length;b++)if(!d[b](a))return!1;return!0};switch(typeof c){case"function":break;case"boolean":if(c==1){c=function(a,b){return s.equals(a,b)};break};default:c=function(a,b){return b=(""+b).toLowerCase(),(""+a).toLowerCase().indexOf(b)>-1}}var e=function(a,b){if(typeof b=="string"&&b.charAt(0)==="!")return!e(a,b.substr(1));switch(typeof a){case"boolean":case"number":case"string":return c(a,b);case"object":switch(typeof b){case"object":return c(a,b);default:for(var d in a)if(d.charAt(0)!=="$"&&e(a[d],b))return!0}return!1;case"array":for(var f=0;f<a.length;f++)if(e(a[f],b))return!0;return!1;default:return!1}};switch(typeof b){case"boolean":case"number":case"string":b={$:b};case"object":for(var f in b)f=="$"?function(){if(!b[f])return;var a=f;d.push(function(c){return e(c,b[a])})}():function(){if(typeof b[f]=="undefined")return;var a=f;d.push(function(c){return e(bA(c,a),b[a])})}();break;case"function":d.push(b);break;default:return a}var g=[];for(var h=0;h<a.length;h++){var i=a[h];d.check(i)&&g.push(i)}return g}}function dG(a){var b=a.NUMBER_FORMATS;return function(a,c){return J(c)&&(c=b.CURRENCY_SYM),dJ(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,2).replace(/\u00A4/g,c)}}function dH(a){var b=a.NUMBER_FORMATS;return function(a,c){return dJ(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function dJ(a,b,c,d,e){if(isNaN(a)||!isFinite(a))return"";var f=a<0;a=Math.abs(a);var g=a+"",h="",i=[],j=!1;if(g.indexOf("e")!==-1){var k=g.match(/([\d\.]+)e(-?)(\d+)/);k&&k[2]=="-"&&k[3]>e+1?g="0":(h=g,j=!0)}if(!j){var l=(g.split(dI)[1]||"").length;J(e)&&(e=Math.min(Math.max(b.minFrac,l),b.maxFrac));var m=Math.pow(10,e);a=Math.round(a*m)/m;var n=(""+a).split(dI),o=n[0];n=n[1]||"";var p=0,q=b.lgSize,r=b.gSize;if(o.length>=q+r){p=o.length-q;for(var s=0;s<p;s++)(p-s)%r===0&&s!==0&&(h+=c),h+=o.charAt(s)}for(s=p;s<o.length;s++)(o.length-s)%q===0&&s!==0&&(h+=c),h+=o.charAt(s);while(n.length<e)n+="0";e&&e!=="0"&&(h+=d+n.substr(0,e))}else e>0&&a>-1&&a<1&&(h=a.toFixed(e));return i.push(f?b.negPre:b.posPre),i.push(h),i.push(f?b.negSuf:b.posSuf),i.join("")}function dK(a,b,c){var d="";a<0&&(d="-",a=-a),a=""+a;while(a.length<b)a="0"+a;return c&&(a=a.substr(a.length-b)),d+a}function dL(a,b,c,d){return c=c||0,function(e){var f=e["get"+a]();if(c>0||f>-c)f+=c;return f===0&&c==-12&&(f=12),dK(f,b,d)}}function dM(a,b){return function(c,d){var e=c["get"+a](),f=h(b?"SHORT"+a:a);return d[f][e]}}function dN(a){var b=-1*a.getTimezoneOffset(),c=b>=0?"+":"";return c+=dK(Math[b>0?"floor":"ceil"](b/60),2)+dK(Math.abs(b%60),2),c}function dO(a,b){return a.getHours()<12?b.AMPMS[0]:b.AMPMS[1]}function dS(a){function c(a){var c;if(c=a.match(b)){var d=new Date(0),e=0,f=0,g=c[8]?d.setUTCFullYear:d.setFullYear,h=c[8]?d.setUTCHours:d.setHours;c[9]&&(e=E(c[9]+c[10]),f=E(c[9]+c[11])),g.call(d,E(c[1]),E(c[2])-1,E(c[3]));var i=E(c[4]||0)-e,j=E(c[5]||0)-f,k=E(c[6]||0),l=Math.round(parseFloat("0."+(c[7]||0))*1e3);return h.call(d,i,j,k,l),d}return a}var b=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(b,d){var e="",f=[],g,h;d=d||"mediumDate",d=a.DATETIME_FORMATS[d]||d,M(b)&&(dR.test(b)?b=E(b):b=c(b)),N(b)&&(b=new Date(b));if(!O(b))return b;while(d)h=dQ.exec(d),h?(f=bg(f,h,1),d=f.pop()):(f.push(d),d=null);return x(f,function(c){g=dP[c],e+=g?g(b,a.DATETIME_FORMATS):c.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),e}}function dT(){return function(a){return bk(a,!0)}}function dW(){return function(a,b){if(!P(a)&&!M(a))return a;b=E(b);if(M(a))return b?b>=0?a.slice(0,b):a.slice(b,a.length):"";var c=[],d,e;b>a.length?b=a.length:b<-a.length&&(b=-a.length),b>0?(d=0,e=b):(d=a.length+b,e=a.length);for(;d<e;d++)c.push(a[d]);return c}}function dX(a){return function(b,c,d){function g(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(e!==0)return e}return 0}function h(a,b){return bm(b)?function(b,c){return a(c,b)}:a}function i(a,b){var c=typeof a,d=typeof b;return c==d?(c=="string"&&(a=a.toLowerCase(),b=b.toLowerCase()),a===b?0:a<b?-1:1):c<d?-1:1}if(!P(b))return b;if(!c)return b;c=P(c)?c:[c],c=Z(c,function(b){var c=!1,d=b||H;if(M(b)){if(b.charAt(0)=="+"||b.charAt(0)=="-")c=b.charAt(0)=="-",b=b.substring(1);d=a(b)}return h(function(a,b){return i(d(a),d(b))},c)});var e=[];for(var f=0;f<b.length;f++)e.push(b[f]);return e.sort(h(g,d))}}function dY(a){return Q(a)&&(a={link:a}),a.restrict=a.restrict||"AC",I(a)}function ea(a,b){function h(b,c){c=c?"-"+bw(c,"-"):"",a.removeClass((b?er:eq)+c).addClass((b?eq:er)+c)}var c=this,d=a.parent().controller("form")||d_,e=0,f=c.$error={},g=[];c.$name=b.name||b.ngForm,c.$dirty=!1,c.$pristine=!0,c.$valid=!0,c.$invalid=!1,d.$addControl(c),a.addClass(es),h(!0),c.$addControl=function(a){g.push(a),a.$name&&!c.hasOwnProperty(a.$name)&&(c[a.$name]=a)},c.$removeControl=function(a){a.$name&&c[a.$name]===a&&delete c[a.$name],x(f,function(b,d){c.$setValidity(d,!0,a)}),bb(g,a)},c.$setValidity=function(a,b,g){var i=f[a];if(b)i&&(bb(i,g),i.length||(e--,e||(h(b),c.$valid=!0,c.$invalid=!1),f[a]=!1,h(!0,a),d.$setValidity(a,!0,c)));else{e||h(b);if(i){if(_(i,g))return}else f[a]=i=[],e++,h(!1,a),d.$setValidity(a,!1,c);i.push(g),c.$valid=!1,c.$invalid=!0}},c.$setDirty=function(){a.removeClass(es).addClass(et),c.$dirty=!0,c.$pristine=!1,d.$setDirty()},c.$setPristine=function(){a.removeClass(et).addClass(es),c.$dirty=!1,c.$pristine=!0,x(g,function(a){a.$setPristine()})}}function ei(a){return J(a)||a===""||a===null||a!==a}function ej(a,b,e,f,g,h){var i=function(){var c=b.val();bm(e.ngTrim||"T")&&(c=W(c)),f.$viewValue!==c&&a.$apply(function(){f.$setViewValue(c)})};if(g.hasEvent("input"))b.on("input",i);else{var j,k=function(){j||(j=h.defer(function(){i(),j=null}))};b.on("keydown",function(a){var b=a.keyCode;if(b===91||15<b&&b<19||37<=b&&b<=40)return;k()}),b.on("change",i),g.hasEvent("paste")&&b.on("paste cut",k)}f.$render=function(){b.val(ei(f.$viewValue)?"":f.$viewValue)};var l=e.ngPattern,m,n,o=function(a,b){return ei(b)||a.test(b)?(f.$setValidity("pattern",!0),b):(f.$setValidity("pattern",!1),c)};l&&(n=l.match(/^\/(.*)\/([gim]*)$/),n?(l=new RegExp(n[1],n[2]),m=function(a){return o(l,a)}):m=function(c){var e=a.$eval(l);if(!e||!e.test)throw d("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",l,e,bn(b));return o(e,c)},f.$formatters.push(m),f.$parsers.push(m));if(e.ngMinlength){var p=E(e.ngMinlength),q=function(a){return!ei(a)&&a.length<p?(f.$setValidity("minlength",!1),c):(f.$setValidity("minlength",!0),a)};f.$parsers.push(q),f.$formatters.push(q)}if(e.ngMaxlength){var r=E(e.ngMaxlength),s=function(a){return!ei(a)&&a.length>r?(f.$setValidity("maxlength",!1),c):(f.$setValidity("maxlength",!0),a)};f.$parsers.push(s),f.$formatters.push(s)}}function ek(a,b,d,e,f,g){ej(a,b,d,e,f,g),e.$parsers.push(function(a){var b=ei(a);return b||eg.test(a)?(e.$setValidity("number",!0),a===""?null:b?a:parseFloat(a)):(e.$setValidity("number",!1),c)}),e.$formatters.push(function(a){return ei(a)?"":""+a});if(d.min){var h=parseFloat(d.min),i=function(a){return!ei(a)&&a<h?(e.$setValidity("min",!1),c):(e.$setValidity("min",!0),a)};e.$parsers.push(i),e.$formatters.push(i)}if(d.max){var j=parseFloat(d.max),k=function(a){return!ei(a)&&a>j?(e.$setValidity("max",!1),c):(e.$setValidity("max",!0),a)};e.$parsers.push(k),e.$formatters.push(k)}e.$formatters.push(function(a){return ei(a)||N(a)?(e.$setValidity("number",!0),a):(e.$setValidity("number",!1),c)})}function el(a,b,d,e,f,g){ej(a,b,d,e,f,g);var h=function(a){return ei(a)||ee.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),c)};e.$formatters.push(h),e.$parsers.push(h)}function em(a,b,d,e,f,g){ej(a,b,d,e,f,g);var h=function(a){return ei(a)||ef.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",!1),c)};e.$formatters.push(h),e.$parsers.push(h)}function en(a,b,c,d){J(c.name)&&b.attr("name",B()),b.on("click",function(){b[0].checked&&a.$apply(function(){d.$setViewValue(c.value)})}),d.$render=function(){var a=c.value;b[0].checked=a==d.$viewValue},c.$observe("value",d.$render)}function eo(a,b,c,d){var e=c.ngTrueValue,f=c.ngFalseValue;M(e)||(e=!0),M(f)||(f=!1),b.on("click",function(){a.$apply(function(){d.$setViewValue(b[0].checked)})}),d.$render=function(){b[0].checked=d.$viewValue},d.$formatters.push(function(a){return a===e}),d.$parsers.push(function(a){return a?e:f})}function eE(a,b){return a="ngClass"+a,function(){return{restrict:"AC",link:function(d,e,f){function h(a){if(b===!0||d.$index%2===b)g&&!bf(a,g)&&i(g),j(a);g=bd(a)}function i(a){f.$removeClass(k(a))}function j(a){f.$addClass(k(a))}function k(a){if(P(a))return a.join(" ");if(L(a)){var b=[],c=0;return x(a,function(a,c){a&&b.push(c)}),b.join(" ")}return a}var g=c;d.$watch(f[a],h,!0),f.$observe("class",function(b){h(d.$eval(f[a]))}),a!=="ngClass"&&d.$watch("$index",function(c,e){var g=c&1;g!==e&1&&(g===b?j(d.$eval(f[a])):i(d.$eval(f[a])))})}}}}"use strict";var e=Object.prototype.hasOwnProperty,f=function(a,b){return e.call(a,b)},g=function(a){return M(a)?a.toLowerCase():a},h=function(a){return M(a)?a.toUpperCase():a},i=function(a){return M(a)?a.replace(/[A-Z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)|32)}):a},j=function(a){return M(a)?a.replace(/[a-z]/g,function(a){return String.fromCharCode(a.charCodeAt(0)&-33)}):a};"i"!=="I".toLowerCase()&&(g=i,h=j);var k,l,m,n=[].slice,o=[].push,p=Object.prototype.toString,q=d("ng"),r=a.angular,s=a.angular||(a.angular={}),t,u,v=["0","0","0"];k=E((/msie (\d+)/.exec(g(navigator.userAgent))||[])[1]),isNaN(k)&&(k=E((/trident\/.*; rv:(\d+)/.exec(g(navigator.userAgent))||[])[1])),G.$inject=[],H.$inject=[];var W=function(){return String.prototype.trim?function(a){return M(a)?a.trim():a}:function(a){return M(a)?a.replace(/^\s*/,"").replace(/\s*$/,""):a}}();k<9?u=function(a){return a=a.nodeName?a:a[0],a.scopeName&&a.scopeName!="HTML"?h(a.scopeName+":"+a.nodeName):a.nodeName}:u=function(a){return a.nodeName?a.nodeName:a[0].nodeName};var bv=/[A-Z]/g,bC={full:"1.2.0-rc.2",major:1,minor:2,dot:0,codeName:"barehand-atomsplitting"},bE=bP.cache={},bF=bP.expando="ng-"+(new Date).getTime(),bG=1,bH=a.document.addEventListener?function(a,b,c){a.addEventListener(b,c,!1)}:function(a,b,c){a.attachEvent("on"+b,c)},bI=a.document.removeEventListener?function(a,b,c){a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent("on"+b,c)},bK=/([\:\-\_]+(.))/g,bL=/^moz([A-Z])/,bM=d("jqLite"),ca=bP.prototype={ready:function(c){function e(){if(d)return;d=!0,c()}var d=!1;b.readyState==="complete"?setTimeout(e):(this.on("DOMContentLoaded",e),bP(a).on("load",e))},toString:function(){var a=[];return x(this,function(b){a.push(""+b)}),"["+a.join(", ")+"]"},eq:function(a){return a>=0?l(this[a]):l(this[this.length+a])},length:0,push:o,sort:[].sort,splice:[].splice},cb={};x("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(a){cb[g(a)]=a});var cc={};x("input,select,option,textarea,button,form,details".split(","),function(a){cc[h(a)]=!0}),x({data:bV,inheritedData:b_,scope:function(a){return b_(a,"$scope")},controller:b$,injector:function(a){return b_(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:bW,css:function(a,b,d){b=bN(b);if(K(d))a.style[b]=d;else{var e;return k<=8&&(e=a.currentStyle&&a.currentStyle[b],e===""&&(e="auto")),e=e||a.style[b],k<=8&&(e=e===""?c:e),e}},attr:function(a,b,d){var e=g(b);if(cb[e])if(K(d))d?(a[b]=!0,a.setAttribute(b,e)):(a[b]=!1,a.removeAttribute(e));else return a[b]||(a.attributes.getNamedItem(b)||G).specified?e:c;else if(K(d))a.setAttribute(b,d);else if(a.getAttribute){var f=a.getAttribute(b,2);return f===null?c:f}},prop:function(a,b,c){if(K(c))a[b]=c;else return a[b]},text:function(){function b(b,c){var d=a[b.nodeType];if(J(c))return d?b[d]:"";b[d]=c}var a=[];return k<9?(a[1]="innerText",a[3]="nodeValue"):a[1]=a[3]="textContent",b.$dv="",b}(),val:function(a,b){if(J(b)){if(u(a)==="SELECT"&&a.multiple){var c=[];return x(a.options,function(a){a.selected&&c.push(a.value||a.text)}),c.length===0?null:c}return a.value}a.value=b},html:function(a,b){if(J(b))return a.innerHTML;for(var c=0,d=a.childNodes;c<d.length;c++)bR(d[c]);a.innerHTML=b}},function(a,b){bP.prototype[b]=function(b,d){var e,f;if((a.length==2&&a!==bW&&a!==b$?b:d)===c){if(L(b)){for(e=0;e<this.length;e++)if(a===bV)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}var g=a.$dv,h=g==c?Math.min(this.length,1):this.length;for(var i=0;i<h;i++){var j=a(this[i],b,d);g=g?g+j:j}return g}for(e=0;e<this.length;e++)a(this[e],b,d);return this}}),x({removeData:bT,dealoc:bR,on:function fc(a,c,d,e){if(K(e))throw bM("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");var f=bU(a,"events"),g=bU(a,"handle");f||bU(a,"events",f={}),g||bU(a,"handle",g=ce(a,f)),x(c.split(" "),function(c){var e=f[c];if(!e){if(c=="mouseenter"||c=="mouseleave"){var h=b.body.contains||b.body.compareDocumentPosition?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!d&&d.nodeType===1&&!!(c.contains?c.contains(d):a.compareDocumentPosition&&a.compareDocumentPosition(d)&16)}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1};f[c]=[];var i={mouseleave:"mouseout",mouseenter:"mouseover"};fc(a,i[c],function(a){var b=this,d=a.relatedTarget;(!d||d!==b&&!h(b,d))&&g(a,c)})}else bH(a,c,g),f[c]=[];e=f[c]}e.push(d)})},off:bS,replaceWith:function(a,b){var c,d=a.parentNode;bR(a),x(new bP(b),function(b){c?d.insertBefore(b,c.nextSibling):d.replaceChild(b,a),c=b})},children:function(a){var b=[];return x(a.childNodes,function(a){a.nodeType===1&&b.push(a)}),b},contents:function(a){return a.childNodes||[]},append:function(a,b){x(new bP(b),function(b){(a.nodeType===1||a.nodeType===11)&&a.appendChild(b)})},prepend:function(a,b){if(a.nodeType===1){var c=a.firstChild;x(new bP(b),function(b){a.insertBefore(b,c)})}},wrap:function(a,b){b=l(b)[0];var c=a.parentNode;c&&c.replaceChild(b,a),b.appendChild(a)},remove:function(a){bR(a);var b=a.parentNode;b&&b.removeChild(a)},after:function(a,b){var c=a,d=a.parentNode;x(new bP(b),function(a){d.insertBefore(a,c.nextSibling),c=a})},addClass:bY,removeClass:bX,toggleClass:function(a,b,c){J(c)&&(c=!bW(a,b)),(c?bY:bX)(a,b)},parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;var b=a.nextSibling;while(b!=null&&b.nodeType!==1)b=b.nextSibling;return b},find:function(a,b){return a.getElementsByTagName(b)},clone:bQ,triggerHandler:function(a,b,c){var d=(bU(a,"events")||{})[b];c=c||{preventDefault:G,stopPropagation:G},x(d,function(b){b.call(a,c)})}},function(a,b){bP.prototype[b]=function(b,d,e){var f;for(var g=0;g<this.length;g++)f==c?(f=a(this[g],b,d,e),f!==c&&(f=l(f))):bZ(f,a(this[g],b,d,e));return f==c?this:f},bP.prototype.bind=bP.prototype.on,bP.prototype.unbind=bP.prototype.off}),cg.prototype={put:function(a,b){this[cf(a)]=b},get:function(a){return this[cf(a)]},remove:function(a){var b=this[a=cf(a)];return delete this[a],b}};var ch=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,ci=/,/,cj=/^\s*(_?)(\S+?)\1\s*$/,ck=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,cl=d("$injector"),cp=d("$animate"),cq=["$provide",function(a){this.$$selectors={},this.register=function(b,c){var d=b+"-animation";if(b&&b.charAt(0)!=".")throw cp("notcsel","Expecting class selector starting with '.' got '{0}'.",b);this.$$selectors[b.substr(1)]=d,a.factory(d,c)},this.$get=["$timeout",function(a){return{enter:function(b,c,d,e){var f=d&&d[d.length-1],g=c&&c[0]||f&&f.parentNode,h=f&&f.nextSibling||null;x(b,function(a){g.insertBefore(a,h)}),e&&a(e,0,!1)},leave:function(b,c){b.remove(),c&&a(c,0,!1)},move:function(a,b,c,d){this.enter(a,b,c,d)},addClass:function(b,c,d){c=M(c)?c:P(c)?c.join(" "):"",b.addClass(c),d&&a(d,0,!1)},removeClass:function(b,c,d){c=M(c)?c:P(c)?c.join(" "):"",b.removeClass(c),d&&a(d,0,!1)},enabled:G}}]}],cv=d("$compile");cw.$inject=["$provide"];var cx=/^(x[\:\-_]|data[\:\-_])/i,cJ=a.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(b){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(c){}throw d("$httpBackend")("noxhr","This browser does not support XMLHttpRequest.")},cM=d("$interpolate"),cP=/^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,cQ=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,cR={http:80,https:443,ftp:21},cS=d("$location");db.prototype=da.prototype=c_.prototype={$$html5:!1,$$replace:!1,absUrl:dc("$$absUrl"),url:function(a,b){if(J(a))return this.$$url;var c=cQ.exec(a);return c[1]&&this.path(decodeURIComponent(c[1])),(c[2]||c[1])&&this.search(c[3]||""),this.hash(c[5]||"",b),this},protocol:dc("$$protocol"),host:dc("$$host"),port:dc("$$port"),path:dd("$$path",function(a){return a.charAt(0)=="/"?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(M(a))this.$$search=bp(a);else if(L(a))this.$$search=a;else throw cS("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");break;default:b==c||b==null?delete this.$$search[a]:this.$$search[a]=b}return this.$$compose(),this},hash:dd("$$hash",H),replace:function(){return this.$$replace=!0,this}};var dg=d("$parse"),dj={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},"undefined":G,"+":function(a,b,d,e){return d=d(a,b),e=e(a,b),K(d)?K(e)?d+e:d:K(e)?e:c},"-":function(a,b,c,d){return c=c(a,b),d=d(a,b),(K(c)?c:0)-(K(d)?d:0)},"*":function(a,b,c,d){return c(a,b)*d(a,b)},"/":function(a,b,c,d){return c(a,b)/d(a,b)},"%":function(a,b,c,d){return c(a,b)%d(a,b)},"^":function(a,b,c,d){return c(a,b)^d(a,b)},"=":G,"===":function(a,b,c,d){return c(a,b)===d(a,b)},"!==":function(a,b,c,d){return c(a,b)!==d(a,b)},"==":function(a,b,c,d){return c(a,b)==d(a,b)},"!=":function(a,b,c,d){return c(a,b)!=d(a,b)},"<":function(a,b,c,d){return c(a,b)<d(a,b)},">":function(a,b,c,d){return c(a,b)>d(a,b)},"<=":function(a,b,c,d){return c(a,b)<=d(a,b)},">=":function(a,b,c,d){return c(a,b)>=d(a,b)},"&&":function(a,b,c,d){return c(a,b)&&d(a,b)},"||":function(a,b,c,d){return c(a,b)||d(a,b)},"&":function(a,b,c,d){return c(a,b)&d(a,b)},"|":function(a,b,c,d){return d(a,b)(a,b,c(a,b))},"!":function(a,b,c){return!c(a,b)}},dk={n:"\n",f:"\f",r:"\r",t:"\t",v:"","'":"'",'"':'"'},dp={},dw=d("$sce"),dx={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"};dE.$inject=["$provide"],dG.$inject=["$locale"],dH.$inject=["$locale"];var dI=".",dP={yyyy:dL("FullYear",4),yy:dL("FullYear",2,0,!0),y:dL("FullYear",1),MMMM:dM("Month"),MMM:dM("Month",!0),MM:dL("Month",2,1),M:dL("Month",1,1),dd:dL("Date",2),d:dL("Date",1),HH:dL("Hours",2),H:dL("Hours",1),hh:dL("Hours",2,-12),h:dL("Hours",1,-12),mm:dL("Minutes",2),m:dL("Minutes",1),ss:dL("Seconds",2),s:dL("Seconds",1),sss:dL("Milliseconds",3),EEEE:dM("Day"),EEE:dM("Day",!0),a:dO,Z:dN},dQ=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,dR=/^\d+$/;dS.$inject=["$locale"];var dU=I(g),dV=I(h);dX.$inject=["$parse"];var dZ=I({restrict:"E",compile:function(a,c){return k<=8&&(!c.href&&!c.name&&c.$set("href",""),a.append(b.createComment("IE fix"))),function(a,b){b.on("click",function(a){b.attr("href")||a.preventDefault()})}}}),d$={};x(cb,function(a,b){if(a=="multiple")return;var c=cy("ng-"+b);d$[c]=function(){return{priority:100,compile:function(){return function(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}}}}}),x(["src","srcset","href"],function(a){var b=cy("ng-"+a);d$[b]=function(){return{priority:99,link:function(c,d,e){e.$observe(b,function(b){if(!b)return;e.$set(a,b),k&&d.prop(a,e[a])})}}}});var d_={$addControl:G,$removeControl:G,$setValidity:G,$setDirty:G,$setPristine:G};ea.$inject=["$element","$attrs","$scope"];var eb=function(a){return["$timeout",function(b){var d={name:"form",restrict:"E",controller:ea,compile:function(){return{pre:function(a,d,e,f){if(!e.action){var g=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};bH(d[0],"submit",g),d.on("$destroy",function(){b(function(){bI(d[0],"submit",g)},0,!1)})}var h=d.parent().controller("form"),i=e.name||e.ngForm;i&&dn(a,i,f,i),h&&d.on("$destroy",function(){h.$removeControl(f),i&&dn(a,i,c,i),D(f,d_)})}}}};return a?D(bd(d),{restrict:"EAC"}):d}]},ec=eb(),ed=eb(!0),ee=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,ef=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}$/,eg=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,eh={text:ej,number:ek,url:el,email:em,radio:en,checkbox:eo,hidden:G,button:G,submit:G,reset:G},ep=["$browser","$sniffer",function(a,b){return{restrict:"E",require:"?ngModel",link:function(c,d,e,f){f&&(eh[g(e.type)]||eh.text)(c,d,e,f,b,a)}}}],eq="ng-valid",er="ng-invalid",es="ng-pristine",et="ng-dirty",eu=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,b,c,e,f){function l(a,b){b=b?"-"+bw(b,"-"):"",e.removeClass((a?er:eq)+b).addClass((a?eq:er)+b)}this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$name=c.name;var g=f(c.ngModel),h=g.assign;if(!h)throw d("ngModel")("nonassign","Expression '{0}' is non-assignable. Element: {1}",c.ngModel,bn(e));this.$render=G;var i=e.inheritedData("$formController")||d_,j=0,k=this.$error={};e.addClass(es),l(!0),this.$setValidity=function(a,b){if(k[a]===!b)return;b?(k[a]&&j--,j||(l(!0),this.$valid=!0,this.$invalid=!1)):(l(!1),this.$invalid=!0,this.$valid=!1,j++),k[a]=!b,l(b,a),i.$setValidity(a,b,this)},this.$setPristine=function(){this.$dirty=!1,this.$pristine=!0,e.removeClass(et).addClass(es)},this.$setViewValue=function(c){this.$viewValue=c,this.$pristine&&(this.$dirty=!0,this.$pristine=!1,e.removeClass(es).addClass(et),i.$setDirty()),x(this.$parsers,function(a){c=a(c)}),this.$modelValue!==c&&(this.$modelValue=c,h(a,c),x(this.$viewChangeListeners,function(a){try{a()}catch(c){b(c)}}))};var m=this;a.$watch(function(){var b=g(a);if(m.$modelValue!==b){var c=m.$formatters,d=c.length;m.$modelValue=b;while(d--)b=c[d](b);m.$viewValue!==b&&(m.$viewValue=b,m.$render())}})}],ev=function(){return{require:["ngModel","^?form"],controller:eu,link:function(a,b,c,d){var e=d[0],f=d[1]||d_;f.$addControl(e),b.on("$destroy",function(){f.$removeControl(e)})}}},ew=I({require:"ngModel",link:function(a,b,c,d){d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)})}}),ex=function(){return{require:"?ngModel",link:function(a,b,c,d){if(!d)return;c.required=!0;var e=function(a){if(c.required&&(ei(a)||a===!1)){d.$setValidity("required",!1);return}return d.$setValidity("required",!0),a};d.$formatters.push(e),d.$parsers.unshift(e),c.$observe("required",function(){e(d.$viewValue)})}}},ey=function(){return{require:"ngModel",link:function(a,b,d,e){var f=/\/(.*)\//.exec(d.ngList),g=f&&new RegExp(f[1])||d.ngList||",",h=function(a){var b=[];return a&&x(a.split(g),function(a){a&&b.push(W(a))}),b};e.$parsers.push(h),e.$formatters.push(function(a){return P(a)?a.join(", "):c})}}},ez=/^(true|false|\d+)$/,eA=function(){return{priority:100,compile:function(a,b){return ez.test(b.ngValue)?function(a,b,c){c.$set("value",a.$eval(c.ngValue))}:function(a,b,c){a.$watch(c.ngValue,function(a){c.$set("value",a)})}}}},eB=dY(function(a,b,d){b.addClass("ng-binding").data("$binding",d.ngBind),a.$watch(d.ngBind,function(a){b.text(a==c?"":a)})}),eC=["$interpolate",function(a){return function(b,c,d){var e=a(c.attr(d.$attr.ngBindTemplate));c.addClass("ng-binding").data("$binding",e),d.$observe("ngBindTemplate",function(a){c.text(a)})}}],eD=["$sce",function(a){return function(b,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtml),b.$watch(d.ngBindHtml,function(b){c.html(a.getTrustedHtml(b)||"")})}}],eF=eE("",!0),eG=eE("Odd",0),eH=eE("Even",1),eI=dY({compile:function(a,b){b.$set("ngCloak",c),a.removeClass("ng-cloak")}}),eJ=[function(){return{scope:!0,controller:"@"}}],eK=["$sniffer",function(a){return{priority:1e3,compile:function(){a.csp=!0}}}],eL={};x("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur".split(" "),function(a){var b=cy("ng-"+a);eL[b]=["$parse",function(c){return function(d,e,f){var h=c(f[b]);e.on(g(a),function(a){d.$apply(function(){h(d,{$event:a})})})}}]});var eM=["$animate",function(a){return{transclude:"element",priority:1e3,terminal:!0,restrict:"A",compile:function(b,d,e){return function(b,d,f){var g,h;b.$watch(f.ngIf,function(f){g&&(a.leave(g),g=c),h&&(h.$destroy(),h=c),bm(f)&&(h=b.$new(),e(h,function(b){g=b,a.enter(b,d.parent(),d)}))})}}}}],eN=["$http","$templateCache","$anchorScroll","$compile","$animate","$sce",function(a,b,c,d,e,f){return{restrict:"ECA",terminal:!0,transclude:"element",compile:function(g,h,i){var j=h.ngInclude||h.src,k=h.onload||"",l=h.autoscroll;return function(g,h){var m=0,n,o,p=function(){n&&(n.$destroy(),n=null),o&&(e.leave(o),o=null)};g.$watch(f.parseAsResourceUrl(j),function(f){var j=++m;f?(a.get(f,{cache:b}).success(function(a){if(j!==m)return;var b=g.$new();i(b,function(f){p(),n=b,o=f,o.html(a),e.enter(o,null,h),d(o.contents())(n),K(l)&&(!l||g.$eval(l))&&c(),n.$emit("$includeContentLoaded"),g.$eval(k)})}).error(function(){j===m&&p()}),g.$emit("$includeContentRequested")):p()})}}}}],eO=dY({compile:function(){return{pre:function(a,b,c){a.$eval(c.ngInit)}}}}),eP=dY({terminal:!0,priority:1e3}),eQ=["$locale","$interpolate",function(a,b){var c=/{}/g;return{restrict:"EA",link:function(d,e,f){var h=f.count,i=f.$attr.when&&e.attr(f.$attr.when),j=f.offset||0,k=d.$eval(i)||{},l={},m=b.startSymbol(),n=b.endSymbol(),o=/^when(Minus)?(.+)$/;x(f,function(a,b){o.test(b)&&(k[g(b.replace("when","").replace("Minus","-"))]=e.attr(f.$attr[b]))}),x(k,function(a,d){l[d]=b(a.replace(c,m+h+"-"+j+n))}),d.$watch(function(){var b=parseFloat(d.$eval(h));return isNaN(b)?"":(b in k||(b=a.pluralCat(b-j)),l[b](d,e,!0))},function(a){e.text(a)})}}}],eR=["$parse","$animate",function(a,b){var c="$$NG_REMOVED",e=d("ngRepeat");return{transclude:"element",priority:1e3,terminal:!0,compile:function(d,f,g){return function(d,f,h){var i=h.ngRepeat,j=i.match(/^\s*(.+)\s+in\s+(.*?)\s*(\s+track\s+by\s+(.+)\s*)?$/),k,m,n,o,p,q,r,s,t,u={$id:cf};if(!j)throw e("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",i);q=j[1],r=j[2],k=j[4],k?(m=a(k),n=function(a,b,c){return t&&(u[t]=a),u[s]=b,u.$index=c,m(d,u)}):(o=function(a,b){return cf(b)},p=function(a){return a}),j=q.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!j)throw e("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",q);s=j[3]||j[1],t=j[2];var v={};d.$watchCollection(r,function y(a){var h,j,k=f[0],m,q={},r,u,y,z,A,B,C,D=[];if(w(a))B=a,n=n||o;else{n=n||p,B=[];for(y in a)a.hasOwnProperty(y)&&y.charAt(0)!="$"&&B.push(y);B.sort()}r=B.length,j=D.length=B.length;for(h=0;h<j;h++){y=a===B?h:B[h],z=a[y],A=n(y,z,h);if(v.hasOwnProperty(A))C=v[A],delete v[A],q[A]=C,D[h]=C;else{if(q.hasOwnProperty(A))throw x(D,function(a){a&&a.startNode&&(v[a.id]=a)}),e("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}",i,A);D[h]={id:A},q[A]=!1}}for(y in v)v.hasOwnProperty(y)&&(C=v[y],b.leave(C.elements),x(C.elements,function(a){a[c]=!0}),C.scope.$destroy());for(h=0,j=B.length;h<j;h++){y=a===B?h:B[h],z=a[y],C=D[h];if(C.startNode){u=C.scope,m=k;do m=m.nextSibling;while(m&&m[c]);C.startNode!=m&&b.move(C.elements,null,l(k)),k=C.endNode}else u=d.$new();u[s]=z,t&&(u[t]=y),u.$index=h,u.$first=h===0,u.$last=h===r-1,u.$middle=!u.$first&&!u.$last,u.$odd=!(u.$even=h%2==0),C.startNode||g(u,function(a){b.enter(a,null,l(k)),k=a,C.scope=u,C.startNode=a[0],C.elements=a,C.endNode=a[a.length-1],q[C.id]=C})}v=q})}}}}],eS=["$animate",function(a){return function(b,c,d){b.$watch(d.ngShow,function(b){a[bm(b)?"removeClass":"addClass"](c,"ng-hide")})}}],eT=["$animate",function(a){return function(b,c,d){b.$watch(d.ngHide,function(b){a[bm(b)?"addClass":"removeClass"](c,"ng-hide")})}}],eU=dY(function(a,b,c){a.$watch(c.ngStyle,function(a,c){c&&a!==c&&x(c,function(a,c){b.css(c,"")}),a&&b.css(a)},!0)}),eV=["$animate",function(a){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(b,c,d,e){var f=d.ngSwitch||d.on,g,h,i=[];b.$watch(f,function j(c){for(var f=0,j=i.length;f<j;f++)i[f].$destroy(),a.leave(h[f]);h=[],i=[];if(g=e.cases["!"+c]||e.cases["?"])b.$eval(d.change),x(g,function(c){var d=b.$new();i.push(d),c.transclude(d,function(b){var d=c.element;h.push(b),a.enter(b,d.parent(),d)})})})}}}],eW=dY({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,b,c){return function(a,d,e,f){f.cases["!"+b.ngSwitchWhen]=f.cases["!"+b.ngSwitchWhen]||[],f.cases["!"+b.ngSwitchWhen].push({transclude:c,element:d})}}}),eX=dY({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,b,c){return function(a,b,d,e){e.cases["?"]=e.cases["?"]||[],e.cases["?"].push({transclude:c,element:b})}}}),eY=dY({controller:["$transclude",function(a){this.$transclude=a}],link:function(a,b,c,d){d.$transclude(function(a){b.html(""),b.append(a)})}}),eZ=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,c){if(c.type=="text/ng-template"){var d=c.id,e=b[0].text;a.put(d,e)}}}}],e$=I({terminal:!0}),e_=["$compile","$parse",function(a,e){var f=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/,g={$setViewValue:G};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(a,b,c){var d=this,e={},f=g,h,i;d.databound=c.ngModel,d.init=function(a,b,c){f=a,h=b,i=c},d.addOption=function(b){e[b]=!0,f.$viewValue==b&&(a.val(b),i.parent()&&i.remove())},d.removeOption=function(a){this.hasOption(a)&&(delete e[a],f.$viewValue==a&&this.renderUnknownOption(a))},d.renderUnknownOption=function(b){var c="? "+cf(b)+" ?";i.val(c),a.prepend(i),a.val(c),i.prop("selected",!0)},d.hasOption=function(a){return e.hasOwnProperty(a)},b.$on("$destroy",function(){d.renderUnknownOption=G})}],link:function(g,h,i,j){function A(a,b,c,d){c.$render=function(){var a=c.$viewValue;d.hasOption(a)?(t.parent()&&t.remove(),b.val(a),a===""&&q.prop("selected",!0)):J(a)&&q?b.val(""):d.renderUnknownOption(a)},b.on("change",function(){a.$apply(function(){t.parent()&&t.remove(),c.$setViewValue(b.val())})})}function B(a,b,c){var d;c.$render=function(){var a=new cg(c.$viewValue);x(b.find("option"),function(b){b.selected=K(a.get(b.value))})},a.$watch(function(){bf(d,c.$viewValue)||(d=bd(c.$viewValue),c.$render())}),b.on("change",function(){a.$apply(function(){var a=[];x(b.find("option"),function(b){b.selected&&a.push(b.value)}),c.$setViewValue(a)})})}function C(b,g,h){function x(){var a={"":[]},d=[""],e,f,i,o,u,x,z=h.$modelValue,A=t(b)||[],B=l?y(A):A,C,D,E,F,G={},H,I=!1,J,K,L;if(n)if(v&&P(z)){I=new cg([]);for(var M=0;M<z.length;M++)G[k]=z[M],I.put(v(b,G),z[M])}else I=new cg(z);for(F=0;D=B.length,F<D;F++){G[k]=A[l?G[l]=B[F]:F],e=m(b,G)||"",(f=a[e])||(f=a[e]=[],d.push(e));if(n)H=I.remove(v?v(b,G):q(b,G))!=c;else{if(v){var N={};N[k]=z,H=v(b,N)===v(b,G)}else H=z===q(b,G);I=I||H}L=j(b,G),L=L===c?"":L,f.push({id:v?v(b,G):l?B[F]:F,label:L,selected:H})}n||(p||z===null?a[""].unshift({id:"",label:"",selected:!I}):I||a[""].unshift({id:"?",label:"",selected:!0}));for(E=0,C=d.length;E<C;E++){e=d[E],f=a[e],w.length<=E?(o={element:s.clone().attr("label",e),label:f.label},u=[o],w.push(u),g.append(o.element)):(u=w[E],o=u[0],o.label!=e&&o.element.attr("label",o.label=e)),J=null;for(F=0,D=f.length;F<D;F++)i=f[F],(x=u[F+1])?(J=x.element,x.label!==i.label&&J.text(x.label=i.label),x.id!==i.id&&J.val(x.id=i.id),J[0].selected!==i.selected&&J.prop("selected",x.selected=i.selected)):(i.id===""&&p?K=p:(K=r.clone()).val(i.id).attr("selected",i.selected).text(i.label),u.push(x={element:K,label:i.label,id:i.id,selected:i.selected}),J?J.after(K):o.element.append(K),J=K);F++;while(u.length>F)u.pop().element.remove()}while(w.length>E)w.pop()[0].element.remove()}var i;if(!(i=o.match(f)))throw d("ngOptions")("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",o,bn(g));var j=e(i[2]||i[1]),k=i[4]||i[6],l=i[5],m=e(i[3]||""),q=e(i[2]?i[1]:k),t=e(i[7]),u=i[8],v=u?e(i[8]):null,w=[[{element:g,label:""}]];p&&(a(p)(b),p.removeClass("ng-scope"),p.remove()),g.html(""),g.on("change",function(){b.$apply(function(){var a,d=t(b)||[],e={},f,i,j,m,o,p,r;if(n){i=[];for(o=0,r=w.length;o<r;o++){a=w[o];for(m=1,p=a.length;m<p;m++)if((j=a[m].element)[0].selected){f=j.val(),l&&(e[l]=f);if(v)for(var s=0;s<d.length;s++){e[k]=d[s];if(v(b,e)==f)break}else e[k]=d[f];i.push(q(b,e))}}}else{f=g.val();if(f=="?")i=c;else if(f=="")i=null;else if(v)for(var s=0;s<d.length;s++){e[k]=d[s];if(v(b,e)==f){i=q(b,e);break}}else e[k]=d[f],l&&(e[l]=f),i=q(b,e)}h.$setViewValue(i)})}),h.$render=x,b.$watch(x)}if(!j[1])return;var k=j[0],m=j[1],n=i.multiple,o=i.ngOptions,p=!1,q,r=l(b.createElement("option")),s=l(b.createElement("optgroup")),t=r.clone();for(var u=0,v=h.children(),w=v.length;u<w;u++)if(v[u].value==""){q=p=v.eq(u);break}k.init(m,p,t);if(n&&(i.required||i.ngRequired)){var z=function(a){return m.$setValidity("required",!i.required||a&&a.length),a};m.$parsers.push(z),m.$formatters.unshift(z),i.$observe("required",function(){z(m.$viewValue)})}o?C(g,h,m):n?B(g,h,m):A(g,h,m,k)}}}],fa=["$interpolate",function(a){var b={addOption:G,removeOption:G};return{restrict:"E",priority:100,compile:function(c,d){if(J(d.value)){var e=a(c.text(),!0);e||d.$set("value",c.text())}return function(a,c,d){var f="$selectController",g=c.parent(),h=g.data(f)||g.parent().data(f);h&&h.databound?c.prop("selected",!1):h=b,e?a.$watch(e,function(a,b){d.$set("value",a),a!==b&&h.removeOption(b),h.addOption(a)}):h.addOption(d.value),c.on("$destroy",function(){h.removeOption(d.value)})}}}}],fb=I({restrict:"E",terminal:!0});bx(),bD(s),l(b).ready(function(){bt(b,bu)})})(window,document),angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}</style>') | 96,303 | 96,303 | 0.627405 |
83b8f7dcf12c20c01f3fd0a0eb4c5b7621800f17 | 379 | js | JavaScript | core/components/com_courses/admin/assets/js/managers.js | anthonyfuentes/hubzero-cms | 3cf435103eb840342bd21ad1c883b9b9f6de6a0d | [
"MIT"
] | null | null | null | core/components/com_courses/admin/assets/js/managers.js | anthonyfuentes/hubzero-cms | 3cf435103eb840342bd21ad1c883b9b9f6de6a0d | [
"MIT"
] | 1 | 2019-03-13T11:01:21.000Z | 2019-03-13T11:01:21.000Z | core/components/com_courses/admin/assets/js/managers.js | anthonyfuentes/hubzero-cms | 3cf435103eb840342bd21ad1c883b9b9f6de6a0d | [
"MIT"
] | null | null | null | /**
* @package hubzero-cms
* @copyright Copyright 2005-2019 HUBzero Foundation, LLC.
* @license http://opensource.org/licenses/MIT MIT
*/
jQuery(document).ready(function($){
$('.entry-role').on('click', function(e) {
var task = document.getElementById('task');
task.value = 'update';
var form = document.getElementById('adminForm');
form.submit();
});
});
| 23.6875 | 59 | 0.656992 |
83b9145c95ca15fa920153cb28443f79ee4d581c | 29,518 | js | JavaScript | cmd/static/kendo/js/kendo.toolbar.min.js | helmutkemper/sitePessoal | 7cabb4185af0faed52c0078fc2695a0f2072201c | [
"Apache-2.0"
] | 1 | 2021-06-01T14:16:33.000Z | 2021-06-01T14:16:33.000Z | cmd/static/kendo/js/kendo.toolbar.min.js | helmutkemper/sitePessoal | 7cabb4185af0faed52c0078fc2695a0f2072201c | [
"Apache-2.0"
] | null | null | null | cmd/static/kendo/js/kendo.toolbar.min.js | helmutkemper/sitePessoal | 7cabb4185af0faed52c0078fc2695a0f2072201c | [
"Apache-2.0"
] | null | null | null | /**
* Kendo UI v2019.2.619 (http://www.telerik.com/kendo-ui)
* Copyright 2019 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial license terms.
*/
!function(t,define){define("kendo.toolbar.min",["kendo.core.min","kendo.userevents.min","kendo.popup.min"],t)}(function(){return function(t,e){function o(t){t.target.is(".k-toggle-button")||t.target.toggleClass(W,"press"==t.type)}function i(e){return e=t(e),e.hasClass("km-actionsheet")?e.closest(".km-popup-wrapper"):e.addClass("km-widget km-actionsheet").wrap('<div class="km-actionsheet-wrapper km-actionsheet-tablet km-widget km-popup"></div>').parent().wrap('<div class="km-popup-wrapper k-popup"></div>').parent()}function n(e){t(e.target).closest("a.k-button").length&&e.preventDefault()}function s(e,o){var i="next"===o?t.fn.next:t.fn.prev,n="next"===o?t.fn.first:t.fn.last,l=i.call(e);return!l.length&&e.is("."+$)?e:l.is(":kendoFocusable")||!l.length?l:l.find(":kendoFocusable").length?n.call(l.find(":kendoFocusable")):s(l,o)}var l,r,a,d,h,p,u,c,f,v,m,b,g,w,k,C,y,A=window.kendo,_=A.Class,x=A.ui.Widget,B=t.proxy,E=A.isFunction,T=A.keys,O=A._outerWidth,I="k-toolbar",F="k-button",P="k-overflow-button",U="k-toggle-button",D="k-button-group",z="k-split-button",G="k-separator",H="k-spacer",N="spacer",R="k-popup",M="k-toolbar-resizable",W="k-state-active",S="k-state-disabled",K="k-state-hidden",j="k-group-start",q="k-group-end",Q="k-primary",V="k-icon",L="k-i-",J="k-button-icon",X="k-button-icontext",Y="k-list-container k-split-container",Z="k-split-button-arrow",$="k-overflow-anchor",tt="k-overflow-container",et="k-toolbar-first-visible",ot="k-toolbar-last-visible",it="click",nt="toggle",st="open",lt="close",rt="overflowOpen",at="overflowClose",dt="never",ht="auto",pt="always",ut="k-overflow-hidden",ct="_optionlist",ft=A.attr("uid");A.toolbar={},l={overflowAnchor:'<div tabindex="0" class="k-overflow-anchor k-button"></div>',overflowContainer:'<ul class="k-overflow-container k-list-container"></ul>'},A.toolbar.registerComponent=function(t,e,o){l[t]={toolbar:e,overflow:o}},r=A.Class.extend({addOverflowAttr:function(){this.element.attr(A.attr("overflow"),this.options.overflow||ht)},addUidAttr:function(){this.element.attr(ft,this.options.uid)},addIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id)},addOverflowIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id+"_overflow")},attributes:function(){this.options.attributes&&this.element.attr(this.options.attributes)},show:function(){this.element.removeClass(K).show(),this.options.hidden=!1},hide:function(){this.element.addClass(K).hide(),this.overflow&&this.overflowHidden&&this.overflowHidden(),this.options.hidden=!0},remove:function(){this.element.remove()},enable:function(t){t===e&&(t=!0),this.element.toggleClass(S,!t),this.options.enable=t},twin:function(){var o=this.element.attr(ft);return this.overflow&&this.options.splitContainerId?t("#"+this.options.splitContainerId).find("["+ft+"='"+o+"']").data(this.options.type):this.overflow?this.toolbar.element.find("["+ft+"='"+o+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+ft+"='"+o+"']").data(this.options.type):e}}),A.toolbar.Item=r,a=r.extend({init:function(o,i){var n=t(o.useButtonTag?'<button tabindex="0"></button>':'<a href tabindex="0"></a>');this.element=n,this.options=o,this.toolbar=i,this.attributes(),o.primary&&n.addClass(Q),o.togglable&&(n.addClass(U),this.toggle(o.selected)),o.url===e||o.useButtonTag||(n.attr("href",o.url),o.mobile&&n.attr(A.attr("role"),"button")),o.group&&(n.attr(A.attr("group"),o.group),this.group=this.toolbar.addToGroup(this,o.group)),!o.togglable&&o.click&&E(o.click)&&(this.clickHandler=o.click),o.togglable&&o.toggle&&E(o.toggle)&&(this.toggleHandler=o.toggle)},toggle:function(t,e){t=!!t,this.group&&t?this.group.select(this):this.group||this.select(t),e&&this.twin()&&this.twin().toggle(t)},getParentGroup:function(){if(this.options.isChild)return this.element.closest("."+D).data("buttonGroup")},_addGraphics:function(){var e,o,i,n=this.element,s=this.options.icon,l=this.options.spriteCssClass,r=this.options.imageUrl;(l||r||s)&&(e=!0,n.contents().filter(function(){return!t(this).hasClass("k-sprite")&&!t(this).hasClass(V)&&!t(this).hasClass("k-image")}).each(function(o,i){(1==i.nodeType||3==i.nodeType&&t.trim(i.nodeValue).length>0)&&(e=!1)}),n.addClass(e?J:X)),s?(o=n.children("span."+V).first(),o[0]||(o=t('<span class="'+V+'"></span>').prependTo(n)),o.addClass(L+s)):l?(o=n.children("span.k-sprite").first(),o[0]||(o=t('<span class="k-sprite '+V+'"></span>').prependTo(n)),o.addClass(l)):r&&(i=n.children("img.k-image").first(),i[0]||(i=t('<img alt="icon" class="k-image" />').prependTo(n)),i.attr("src",r))}}),A.toolbar.Button=a,d=a.extend({init:function(t,e){a.fn.init.call(this,t,e);var o=this.element;o.addClass(F),this.addIdAttr(),t.align&&o.addClass("k-align-"+t.align),"overflow"!=t.showText&&t.text&&o.html(t.mobile?'<span class="km-text">'+t.text+"</span>":t.text),t.hasIcon="overflow"!=t.showIcon&&(t.icon||t.spriteCssClass||t.imageUrl),t.hasIcon&&this._addGraphics(),this.addUidAttr(),this.addOverflowAttr(),this.enable(t.enable),t.hidden&&this.hide(),this.element.data({type:"button",button:this})},select:function(t){t===e&&(t=!1),this.element.toggleClass(W,t),this.options.selected=t}}),A.toolbar.ToolBarButton=d,h=a.extend({init:function(e,o){this.overflow=!0,a.fn.init.call(this,t.extend({},e),o);var i=this.element;"toolbar"!=e.showText&&e.text&&i.html(e.mobile?'<span class="km-text">'+e.text+"</span>":'<span class="k-text">'+e.text+"</span>"),e.hasIcon="toolbar"!=e.showIcon&&(e.icon||e.spriteCssClass||e.imageUrl),e.hasIcon&&this._addGraphics(),e.isChild||this._wrap(),this.addOverflowIdAttr(),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.enable(e.enable),i.addClass(P+" "+F),e.hidden&&this.hide(),e.togglable&&this.toggle(e.selected),this.element.data({type:"button",button:this})},_wrap:function(){this.element=this.element.wrap("<li></li>").parent()},overflowHidden:function(){this.element.addClass(ut)},select:function(t){t===e&&(t=!1),this.options.isChild?this.element.toggleClass(W,t):this.element.find(".k-button").toggleClass(W,t),this.options.selected=t}}),A.toolbar.OverflowButton=h,A.toolbar.registerComponent("button",d,h),p=r.extend({createButtons:function(e){var o,i,n=this.options,s=n.buttons||[];for(i=0;i<s.length;i++)s[i].uid||(s[i].uid=A.guid()),o=new e(t.extend({mobile:n.mobile,isChild:!0,type:"button"},s[i]),this.toolbar),o.element.appendTo(this.element)},refresh:function(){this.element.children().filter(":not('."+K+"'):first").addClass(j),this.element.children().filter(":not('."+K+"'):last").addClass(q)}}),A.toolbar.ButtonGroup=p,u=p.extend({init:function(e,o){var i=this.element=t("<div></div>");this.options=e,this.toolbar=o,this.addIdAttr(),e.align&&i.addClass("k-align-"+e.align),this.createButtons(d),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass(D),this.element.data({type:"buttonGroup",buttonGroup:this})}}),A.toolbar.ToolBarButtonGroup=u,c=p.extend({init:function(e,o){var i=this.element=t("<li></li>");this.options=e,this.toolbar=o,this.overflow=!0,this.addOverflowIdAttr(),this.createButtons(h),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass((e.mobile?"":D)+" k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(ut)}}),A.toolbar.OverflowButtonGroup=c,A.toolbar.registerComponent("buttonGroup",u,c),f=r.extend({init:function(e,o){var i=this.element=t('<div class="'+z+'" tabindex="0"></div>');this.options=e,this.toolbar=o,this.mainButton=new d(t.extend({},e,{hidden:!1}),o),this.arrowButton=t('<a class="'+F+" "+Z+'"><span class="'+(e.mobile?"km-icon km-arrowdown":"k-icon k-i-arrow-60-down")+'"></span></a>'),this.popupElement=t('<ul class="'+Y+'"></ul>'),this.mainButton.element.removeAttr("href tabindex").appendTo(i),this.arrowButton.appendTo(i),this.popupElement.appendTo(i),e.align&&i.addClass("k-align-"+e.align),e.id||(e.id=e.uid),i.attr("id",e.id+"_wrapper"),this.addOverflowAttr(),this.addUidAttr(),this.createMenuButtons(),this.createPopup(),this._navigatable(),this.mainButton.main=!0,this.enable(e.enable),e.hidden&&this.hide(),i.data({type:"splitButton",splitButton:this,kendoPopup:this.popup})},_navigatable:function(){var e=this;e.popupElement.on("keydown","."+F,function(o){var i=t(o.target).parent();o.preventDefault(),o.keyCode===T.ESC||o.keyCode===T.TAB||o.altKey&&o.keyCode===T.UP?(e.toggle(),e.focus()):o.keyCode===T.DOWN?s(i,"next").focus():o.keyCode===T.UP?s(i,"prev").focus():o.keyCode===T.SPACEBAR||o.keyCode===T.ENTER?e.toolbar.userEvents.trigger("tap",{target:t(o.target)}):o.keyCode===T.HOME?i.parent().find(":kendoFocusable").first().focus():o.keyCode===T.END&&i.parent().find(":kendoFocusable").last().focus()})},createMenuButtons:function(){var e,o,i=this.options,n=i.menuButtons;for(o=0;o<n.length;o++)e=new d(t.extend({mobile:i.mobile,type:"button",click:i.click},n[o]),this.toolbar),e.element.wrap("<li></li>").parent().appendTo(this.popupElement)},createPopup:function(){var o=this,s=this.options,l=this.element;this.popupElement.attr("id",s.id+ct).attr(ft,s.rootUid),s.mobile&&(this.popupElement=i(this.popupElement)),this.popup=this.popupElement.kendoPopup({appendTo:s.mobile?t(s.mobile).children(".km-pane"):null,anchor:l,isRtl:this.toolbar._isRtl,copyAnchorStyles:!1,animation:s.animation,open:function(t){var i=o.toolbar.trigger(st,{target:l});return i?(t.preventDefault(),e):(o.adjustPopupWidth(t.sender),e)},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(t){var e=o.toolbar.trigger(lt,{target:l});e&&t.preventDefault(),l.focus()}}).data("kendoPopup"),this.popup.element.on(it,"a.k-button",n)},adjustPopupWidth:function(t){var e,o=t.options.anchor,i=O(o);A.wrap(t.element).addClass("k-split-wrapper"),e="border-box"!==t.element.css("box-sizing")?i-(O(t.element)-t.element.width()):i,t.element.css({fontFamily:o.css("font-family"),"min-width":e})},remove:function(){this.popup.element.off(it,"a.k-button"),this.popup.destroy(),this.element.remove()},toggle:function(){(this.options.enable||this.popup.visible())&&this.popup.toggle()},enable:function(t){t===e&&(t=!0),this.mainButton.enable(t),this.element.toggleClass(S,!t),this.options.enable=t},focus:function(){this.element.focus()},hide:function(){this.popup&&this.popup.close(),this.element.addClass(K).hide(),this.options.hidden=!0},show:function(){this.element.removeClass(K).hide(),this.options.hidden=!1}}),A.toolbar.ToolBarSplitButton=f,v=r.extend({init:function(e,o){var i,n,s,l=this.element=t('<li class="'+z+'"></li>'),r=e.menuButtons;for(this.options=e,this.toolbar=o,this.overflow=!0,n=(e.id||e.uid)+ct,this.mainButton=new h(t.extend({},e)),this.mainButton.element.appendTo(l),s=0;s<r.length;s++)i=new h(t.extend({mobile:e.mobile,type:"button",splitContainerId:n},r[s]),this.toolbar),i.element.appendTo(l);this.addUidAttr(),this.addOverflowAttr(),this.mainButton.main=!0,l.data({type:"splitButton",splitButton:this})},overflowHidden:function(){this.element.addClass(ut)}}),A.toolbar.OverflowSplitButton=v,A.toolbar.registerComponent("splitButton",f,v),m=r.extend({init:function(e,o){var i=this.element=t("<div> </div>");this.element=i,this.options=e,this.toolbar=o,this.attributes(),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),i.addClass(G),i.data({type:"separator",separator:this})}}),b=r.extend({init:function(e,o){var i=this.element=t("<li> </li>");this.element=i,this.options=e,this.toolbar=o,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),i.addClass(G),i.data({type:"separator",separator:this})},overflowHidden:function(){this.element.addClass(ut)}}),A.toolbar.registerComponent("separator",m,b),g=r.extend({init:function(e,o){var i=this.element=t("<div> </div>");this.element=i,this.options=e,this.toolbar=o,i.addClass(H),i.data({type:N})}}),A.toolbar.registerComponent(N,g),w=r.extend({init:function(e,o,i){var n=E(e)?e(o):e;n=n instanceof jQuery?n.wrap("<div></div>").parent():t("<div></div>").html(n),this.element=n,this.options=o,this.options.type="template",this.toolbar=i,this.attributes(),this.addUidAttr(),this.addIdAttr(),this.addOverflowAttr(),n.data({type:"template",template:this})}}),A.toolbar.TemplateItem=w,k=r.extend({init:function(e,o,i){var n=t(E(e)?e(o):e);n=n instanceof jQuery?n.wrap("<li></li>").parent():t("<li></li>").html(n),this.element=n,this.options=o,this.options.type="template",this.toolbar=i,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),this.addOverflowAttr(),n.data({type:"template",template:this})},overflowHidden:function(){this.element.addClass(ut)}}),A.toolbar.OverflowTemplateItem=k,C=_.extend({init:function(t){this.name=t,this.buttons=[]},add:function(t){this.buttons[this.buttons.length]=t},remove:function(e){var o=t.inArray(e,this.buttons);this.buttons.splice(o,1)},select:function(t){var e,o;for(o=0;o<this.buttons.length;o++)e=this.buttons[o],e.select(!1);t.select(!0),t.twin()&&t.twin().select(!0)}}),y=x.extend({init:function(e,i){var s,l=this;if(x.fn.init.call(l,e,i),i=l.options,e=l.wrapper=l.element,e.addClass(I+" k-widget"),this.uid=A.guid(),this._isRtl=A.support.isRtl(e),this._groups={},e.attr(ft,this.uid),l.isMobile="boolean"==typeof i.mobile?i.mobile:l.element.closest(".km-root")[0],l.animation=l.isMobile?{open:{effects:"fade"}}:{},l.isMobile&&(e.addClass("km-widget"),V="km-icon",L="km-",F="km-button",D="km-buttongroup",W="km-state-active",S="km-state-disabled"),i.resizable?(l._renderOverflow(),e.addClass(M),l.overflowUserEvents=new A.UserEvents(l.element,{threshold:5,allowSelection:!0,filter:"."+$,tap:B(l._toggleOverflow,l)}),l._resizeHandler=A.onResize(function(){l.resize()})):l.popup={element:t([])},i.items&&i.items.length){for(s=0;s<i.items.length;s++)l.add(i.items[s]);i.resizable&&l._shrink(l.element.innerWidth())}l.userEvents=new A.UserEvents(document,{threshold:5,allowSelection:!0,filter:"["+ft+"="+this.uid+"] a."+F+", ["+ft+"="+this.uid+"] ."+P,tap:B(l._buttonClick,l),press:o,release:o}),l.element.on(it,"a.k-button",n),l._navigatable(),i.resizable&&l.popup.element.on(it,NaN,n),i.resizable&&this._toggleOverflowAnchor(),A.notify(l)},events:[it,nt,st,lt,rt,at],options:{name:"ToolBar",items:[],resizable:!0,mobile:null},addToGroup:function(t,e){var o;return o=this._groups[e]?this._groups[e]:this._groups[e]=new C,o.add(t),o},destroy:function(){var e=this;e.element.find("."+z).each(function(e,o){t(o).data("kendoPopup").destroy()}),e.element.off(it,"a.k-button"),e.userEvents.destroy(),e.options.resizable&&(A.unbindResize(e._resizeHandler),e.overflowUserEvents.destroy(),e.popup.element.off(it,"a.k-button"),e.popup.destroy()),x.fn.destroy.call(e)},add:function(e){var o,i,n,s=l[e.type],r=e.template,a=this,d=a.isMobile?"":"k-item k-state-default",h=e.overflowTemplate;if(t.extend(e,{uid:A.guid(),animation:a.animation,mobile:a.isMobile,rootUid:a.uid}),e.menuButtons)for(n=0;n<e.menuButtons.length;n++)t.extend(e.menuButtons[n],{uid:A.guid()});r&&!h||e.type===N?e.overflow=dt:e.overflow||(e.overflow=ht),e.overflow!==dt&&a.options.resizable&&(h?i=new k(h,e,a):s&&(i=new s.overflow(e,a),i.element.addClass(d)),i&&(e.overflow===ht&&i.overflowHidden(),i.element.appendTo(a.popup.container),a.angular("compile",function(){return{elements:i.element.get()}}))),e.overflow!==pt&&(r?o=new w(r,e,a):s&&(o=new s.toolbar(e,a)),o&&(o.element.appendTo(a.element),a.angular("compile",function(){return{elements:o.element.get()}})))},_getItem:function(e){var o,i,n,s,l=this.options.resizable;return o=this.element.find(e),o.length||(o=t(".k-split-container[data-uid="+this.uid+"]").find(e)),s=o.length?o.data("type"):"",i=o.data(s),i?(i.main&&(o=o.parent("."+z),s="splitButton",i=o.data(s)),l&&(n=i.twin())):l&&(o=this.popup.element.find(e),s=o.length?o.data("type"):"",n=o.data(s),n&&n.main&&(o=o.parent("."+z),s="splitButton",n=o.data(s))),{type:s,toolbar:i,overflow:n}},remove:function(t){var e=this._getItem(t);e.toolbar&&e.toolbar.remove(),e.overflow&&e.overflow.remove(),this.resize(!0)},hide:function(t){var e,o=this._getItem(t);o.toolbar&&("button"===o.toolbar.options.type&&o.toolbar.options.isChild?(e=o.toolbar.getParentGroup(),o.toolbar.hide(),e&&e.refresh()):o.toolbar.options.hidden||o.toolbar.hide()),o.overflow&&("button"===o.overflow.options.type&&o.overflow.options.isChild?(e=o.overflow.getParentGroup(),o.overflow.hide(),e&&e.refresh()):o.overflow.options.hidden||o.overflow.hide()),this.resize(!0)},show:function(t){var e=this._getItem(t);e.toolbar&&("button"===e.toolbar.options.type&&e.toolbar.options.isChild?(e.toolbar.show(),e.toolbar.getParentGroup().refresh()):e.toolbar.options.hidden&&e.toolbar.show()),e.overflow&&("button"===e.overflow.options.type&&e.overflow.options.isChild?(e.toolbar.show(),e.overflow.getParentGroup().refresh()):e.overflow.options.hidden&&e.overflow.show()),this.resize(!0)},enable:function(t,o){var i=this._getItem(t);e===o&&(o=!0),i.toolbar&&i.toolbar.enable(o),i.overflow&&i.overflow.enable(o)},getSelectedFromGroup:function(t){return this.element.find("."+U+"[data-group='"+t+"']").filter("."+W)},toggle:function(o,i){var n=t(o),s=n.data("button");s.options.togglable&&(i===e&&(i=!0),s.toggle(i,!0))},_renderOverflow:function(){var e=this,o=l.overflowContainer,n=e._isRtl,r=n?"left":"right";e.overflowAnchor=t(l.overflowAnchor).addClass(F),e.element.append(e.overflowAnchor),e.isMobile?(e.overflowAnchor.append('<span class="km-icon km-more"></span>'),o=i(o)):e.overflowAnchor.append('<span class="k-icon k-i-more-vertical"></span>'),e.popup=new A.ui.Popup(o,{origin:"bottom "+r,position:"top "+r,anchor:e.overflowAnchor,isRtl:n,animation:e.animation,appendTo:e.isMobile?t(e.isMobile).children(".km-pane"):null,copyAnchorStyles:!1,open:function(o){var i=A.wrap(e.popup.element).addClass("k-overflow-wrapper");e.isMobile?e.popup.container.css("max-height",parseFloat(t(".km-content:visible").innerHeight())-15+"px"):i.css("margin-left",(n?-1:1)*((O(i)-i.width())/2+1)),e.trigger(rt)&&o.preventDefault()},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(t){e.trigger(at)&&t.preventDefault(),this.element.focus()}}),e.popup.element.on("keydown","."+F,function(o){var i,n=t(o.target),l=n.parent(),r=l.is("."+D)||l.is("."+z);o.preventDefault(),o.keyCode===T.ESC||o.keyCode===T.TAB||o.altKey&&o.keyCode===T.UP?(e._toggleOverflow(),e.overflowAnchor.focus()):o.keyCode===T.DOWN?(i=!r||r&&n.is(":last-child")?l:n,s(i,"next").focus()):o.keyCode===T.UP?(i=!r||r&&n.is(":first-child")?l:n,s(i,"prev").focus()):o.keyCode===T.SPACEBAR||o.keyCode===T.ENTER?(e.userEvents.trigger("tap",{target:t(o.target)}),e.overflowAnchor.focus()):o.keyCode===T.HOME?l.parent().find(":kendoFocusable").first().focus():o.keyCode===T.END&&l.parent().find(":kendoFocusable").last().focus()}),e.popup.container=e.isMobile?e.popup.element.find("."+tt):e.popup.element,e.popup.container.attr(ft,this.uid)},_toggleOverflowAnchor:function(){var t=!1,e=this._isRtl?"padding-left":"padding-right";t=this.options.mobile?this.popup.element.find("."+tt).children(":not(."+ut+", ."+R+")").length>0:this.popup.element.children(":not(."+ut+", ."+R+")").length>0,t?(this.overflowAnchor.css({visibility:"visible",width:""}),this.wrapper.css(e,this.overflowAnchor.outerWidth(!0))):(this.overflowAnchor.css({visibility:"hidden",width:"1px"}),this.wrapper.css(e,""))},_buttonClick:function(o){var i,n,s,l,r,a,d,h=this,p=o.target.closest("."+Z).length;return o.preventDefault(),p?(h._toggle(o),e):(n=t(o.target).closest("."+F,h.element),n.hasClass($)||(s=n.data("button"),!s&&h.popup&&(n=t(o.target).closest("."+P,h.popup.container),s=n.parent("li").data("button")),s&&s.options.enable&&(s.options.togglable?(r=E(s.toggleHandler)?s.toggleHandler:null,s.toggle(!s.options.selected,!0),a={target:n,group:s.options.group,checked:s.options.selected,id:s.options.id,item:s},r&&r.call(h,a),h.trigger(nt,a)):(r=E(s.clickHandler)?s.clickHandler:null,a={sender:h,target:n,id:s.options.id,item:s},r&&r.call(h,a),h.trigger(it,a)),s.options.url&&(s.options.attributes&&s.options.attributes.target&&(d=s.options.attributes.target),window.open(s.options.url,d||"_self")),n.hasClass(P)&&h.popup.close(),l=n.closest(".k-split-container"),l[0]&&(i=l.data("kendoPopup"),(i?i:l.parents(".km-popup-wrapper").data("kendoPopup")).close()))),e)},_navigatable:function(){var e=this;e.element.attr("tabindex",0).on("focusin",function(e){var o=t(e.target),i=t(this).find(":kendoFocusable:first");o.is("."+I)&&0!==i.length&&(i.is("."+$)&&(i=s(i,"next")),i.length&&i[0].focus())}).on("keydown",B(e._keydown,e))},_keydown:function(o){var i,n,s,l,r,a,d,h,p,u=t(o.target),c=o.keyCode,f=this.element.children(":not(.k-separator):visible"),v=this._isRtl?-1:1;if(c===T.TAB&&(i=u.parentsUntil(this.element).last(),n=!1,s=!1,l=!1,f.not("."+$).length||(l=!0),i.length||(i=u),i.is("."+$)&&!l&&(r=f.last(),o.shiftKey&&o.preventDefault(),r.is(":kendoFocusable")?f.last().focus():f.last().find(":kendoFocusable").last().focus()),o.shiftKey||f.index(i)!==f.length-1||(n=!i.is("."+D)||u.is(":last-child")),a=f.index(i)===f.not(".k-overflow-anchor").first().index(),o.shiftKey&&a&&(s=!i.is("."+D)||u.is(":first-child")),n&&this.overflowAnchor&&"hidden"!==this.overflowAnchor.css("visibility")&&!l&&(o.preventDefault(),this.overflowAnchor.focus()),(s||l&&o.shiftKey)&&(o.preventDefault(),d=this._getPrevFocusable(this.wrapper),d&&d.focus()),this._preventNextFocus=!1),o.altKey&&c===T.DOWN)return h=t(document.activeElement).data("splitButton"),p=t(document.activeElement).is("."+$),h?h.toggle():p&&this._toggleOverflow(),e;if((c===T.SPACEBAR||c===T.ENTER)&&!u.is("input, checkbox"))return c===T.SPACEBAR&&o.preventDefault(),u.is("."+z)?(u=u.children().first(),this.userEvents.trigger("tap",{target:u})):c===T.SPACEBAR&&this.userEvents.trigger("tap",{target:u}),e;if(c===T.HOME){if(u.is(".k-dropdown")||u.is("input"))return;this.overflowAnchor?f.eq(1).focus():f.first().focus(),o.preventDefault()}else if(c===T.END){if(u.is(".k-dropdown")||u.is("input"))return;this.overflowAnchor&&"hidden"!=t(this.overflowAnchor).css("visibility")?this.overflowAnchor.focus():f.last().focus(),o.preventDefault()}else c!==T.RIGHT||this._preventNextFocus||u.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(o.target,1*v)?c!==T.LEFT||this._preventNextFocus||u.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(o.target,-1*v)||(this._getNextElement(o.target,-1*v).focus(),o.preventDefault()):(this._getNextElement(o.target,1*v).focus(),o.preventDefault())},_getNextElement:function(e,o){var i=this.element.children(":not(.k-separator):visible"),n=i.index(i.index(e)===-1?e.parentElement:e),s=this.overflowAnchor?1:0,l=o,r=1===o?i.length-1:s,a=1===o?s:i.length-1,d=i[n+o];if(this._preventNextFocus=!1,t(e).closest("."+D).length&&!t(e).is(1===o?":last-child":":first-child"))return t(e).closest("."+D).children()[t(e).closest("."+D).children().index(e)+o];for(this.overflowAnchor&&e===this.overflowAnchor[0]&&o===-1&&(d=i[i.length-1]),n===r&&(d=!this.overflowAnchor||this.overflowAnchor&&"hidden"===t(this.overflowAnchor).css("visibility")?i[a]:this.overflowAnchor);!t(d).is(":kendoFocusable");){if(d=o===-1&&t(d).closest("."+D).length?t(d).children(":not(label, div)").last():t(d).children(":not(label, div)").first(),!d.length&&(l+=o,d=i[n+l],!d))return this.overflowAnchor;this._preventNextFocus=!t(d).closest("."+D).length}return d},_getPrevFocusable:function(o){if(o.is("html"))return o;var i,n,s=o.prevAll();return s.each(function(){return n=t(this),n.is(":kendoFocusable")?(i=n,!1):n.find(":kendoFocusable").length>0?(i=n.find(":kendoFocusable").last(),!1):e}),i?i:this._getPrevFocusable(o.parent())},_toggle:function(e){var o=t(e.target).closest("."+z).data("splitButton");e.preventDefault(),o.options.enable&&o.toggle()},_toggleOverflow:function(){this.popup.toggle()},_resize:function(t){var e=t.width;this.options.resizable&&(this.popup.close(),this._shrink(e),this._stretch(e),this._markVisibles(),this._toggleOverflowAnchor())},_childrenWidth:function(){var e=0;return this.element.children(":visible:not(."+K+", ."+H+")").each(function(){e+=O(t(this),!0)}),Math.ceil(e)},_shrink:function(t){var e,o,i;if(t<this._childrenWidth())for(o=this.element.children(":visible:not([data-overflow='never'], ."+$+")"),i=o.length-1;i>=0&&(e=o.eq(i),!(t>this._childrenWidth()));i--)this._hideItem(e)},_stretch:function(t){var e,o,i;if(t>this._childrenWidth())for(o=this.element.children(":hidden:not('."+K+"')"),i=0;i<o.length&&(e=o.eq(i),!(t<this._childrenWidth())&&this._showItem(e,t));i++);},_hideItem:function(t){t.hide(),this.popup&&this.popup.container.find(">li[data-uid='"+t.data("uid")+"']").removeClass(ut)},_showItem:function(t,e){return!!(t.length&&e>this._childrenWidth()+O(t,!0))&&(t.show(),this.popup&&this.popup.container.find(">li[data-uid='"+t.data("uid")+"']").addClass(ut),!0)},_markVisibles:function(){var t=this.popup.container.children(),e=this.element.children(":not(.k-overflow-anchor)"),o=t.filter(":not(.k-overflow-hidden)"),i=e.filter(":visible");t.add(e).removeClass(et+" "+ot),o.first().add(i.first()).addClass(et),o.last().add(i.last()).addClass(ot)}}),A.ui.plugin(y)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,o){(o||e)()});
//# sourceMappingURL=kendo.toolbar.min.js.map
| 1,093.259259 | 25,256 | 0.615116 |
83b936a6e21230168850dab57644668f2c9146a1 | 305 | js | JavaScript | tasks/cachebusting.js | HVish/streetsupport-web | 37713eeed6a22c96e750880247510268418861af | [
"MIT"
] | 26 | 2015-11-24T15:49:48.000Z | 2020-01-28T15:23:00.000Z | tasks/cachebusting.js | HVish/streetsupport-web | 37713eeed6a22c96e750880247510268418861af | [
"MIT"
] | 85 | 2015-12-14T18:39:32.000Z | 2021-08-11T02:09:36.000Z | tasks/cachebusting.js | HVish/streetsupport-web | 37713eeed6a22c96e750880247510268418861af | [
"MIT"
] | 120 | 2015-11-26T16:59:43.000Z | 2022-03-08T11:32:59.000Z | // Load paths and gulp
import config from '../foley.json'
import gulp from 'gulp'
// Specific task modules
import fs from 'fs'
// HTML minify task
gulp.task('cachebusting', (callback) => {
fs.writeFile(config.paths.data + 'cachebusting.json', '{"date": "' + new Date().getTime() + '"}', callback);
})
| 25.416667 | 110 | 0.662295 |
83b97a3b09eaea084104b4b068604d87b7580cd3 | 3,141 | js | JavaScript | src/Record.js | jbakse/p5.party | 9e0cb99f344068984380569046f302c0accfc6f7 | [
"MIT"
] | 13 | 2020-06-12T17:05:02.000Z | 2022-01-30T22:59:32.000Z | src/Record.js | jbakse/p5.party | 9e0cb99f344068984380569046f302c0accfc6f7 | [
"MIT"
] | 16 | 2020-06-13T18:51:21.000Z | 2022-03-15T19:22:55.000Z | src/Record.js | jbakse/p5.party | 9e0cb99f344068984380569046f302c0accfc6f7 | [
"MIT"
] | 9 | 2020-07-13T15:17:51.000Z | 2022-02-03T20:33:41.000Z | import * as log from "./log";
import * as onChange from "on-change";
import { createEmitter } from "./emitter";
// const customMergeStrategy = (
// localValue,
// localVersion,
// remoteValue,
// remoteVersion,
// callback
// ) => {
// log.warn("Merge");
// callback(null, remoteValue);
// };
export class Record {
#client;
#name;
#shared;
#watchedShared;
#emitter;
#isReady;
#record;
constructor(client, name) {
this.#client = client;
this.#name = name;
this.#shared = {};
this.#watchedShared = onChange(
this.#shared,
this._onClientChangedData.bind(this)
);
this.#shared[Symbol.for("Record")] = this;
this.#emitter = createEmitter();
this.#isReady = false;
this._connect();
}
whenReady(cb) {
if (this.#isReady) {
if (typeof cb === "function") cb();
return Promise.resolve();
}
if (typeof cb === "function") this.#emitter.once("ready", cb);
return new Promise((resolve) => {
this.#emitter.once("ready", resolve);
});
}
// this is broken until a "deep update" is implemented
// allows getting a watched data for data not in shared.
// path needs to exist on record for this to work.
// getData(path) {
// const deep_value = (o, p) => p.split(".").reduce((a, v) => a[v], o);
// return deep_value(this.#watchedData, path);
// }
getShared() {
return this.#watchedShared;
}
setShared(data) {
this.#record.set("shared", data);
}
async delete() {
this.setShared({});
await this.#record.whenReady();
this.#record.delete();
}
async watchShared(path_or_cb, cb) {
await this.whenReady();
if (typeof path_or_cb === "string") {
this.#record.subscribe("shared." + path_or_cb, cb);
} else if (typeof path_or_cb === "function") {
this.#record.subscribe("shared", path_or_cb);
}
}
static recordForShared(shared) {
return onChange.target(shared)[Symbol.for("Record")];
}
async _connect() {
await this.#client.whenReady();
// subscribe to record
this.#record = this.#client.getRecord(this.#name);
// this.#record.setMergeStrategy(customMergeStrategy);
this.#record.subscribe("shared", this._onServerChangedData.bind(this));
await this.#record.whenReady();
// this.#record.delete(); // emergency clear it
if (!this.#record.get("shared")) this.#record.set("shared", {});
// report
log.debug("RecordManager: Record ready.", this.#name);
//log.debug(this.#record.get());
// ready
this.#isReady = true;
this.#emitter.emit("ready");
}
_onClientChangedData(path, newValue, oldValue) {
// on-change alerts us when the value actually changes
// so we don't need to test if newValue and oldValue are different
this.#record.set("shared." + path, newValue);
}
_onServerChangedData(data) {
// replace the CONTENTS of this.#shared
// don't replace #shared itself as #watchedShared has a reference to it
for (const key in this.#shared) {
delete this.#shared[key];
}
for (const key in data) {
this.#shared[key] = data[key];
}
}
}
| 25.536585 | 75 | 0.617001 |
83b9c68d484f5e86ebd5e5be479f89302358260e | 1,614 | js | JavaScript | Frontend/redux/actions/users/usersListActions.js | Saehlin/Madewell | 95e44859e385c0db0c52cfaa9207a8e5d9775de2 | [
"PostgreSQL",
"MIT"
] | null | null | null | Frontend/redux/actions/users/usersListActions.js | Saehlin/Madewell | 95e44859e385c0db0c52cfaa9207a8e5d9775de2 | [
"PostgreSQL",
"MIT"
] | null | null | null | Frontend/redux/actions/users/usersListActions.js | Saehlin/Madewell | 95e44859e385c0db0c52cfaa9207a8e5d9775de2 | [
"PostgreSQL",
"MIT"
] | null | null | null | import Errors from "../../../components/admin/FormItems/error/errors";
import axios from "axios";
async function list() {
const response = await axios.get(`/users`);
return response.data;
}
const actions = {
doFetch: (filter, keepPagination = false) => async (dispatch, getState) => {
try {
dispatch({
type: "USERS_LIST_FETCH_STARTED",
payload: { filter, keepPagination },
});
const response = await list();
dispatch({
type: "USERS_LIST_FETCH_SUCCESS",
payload: {
rows: response.rows,
count: response.count,
},
});
} catch (error) {
Errors.handle(error);
dispatch({
type: "USERS_LIST_FETCH_ERROR",
});
}
},
doDelete: (id) => async (dispatch) => {
try {
dispatch({
type: "USERS_LIST_DELETE_STARTED",
});
await axios.delete(`/users/${id}`);
dispatch({
type: "USERS_LIST_DELETE_SUCCESS",
});
const response = await list();
dispatch({
type: "USERS_LIST_FETCH_SUCCESS",
payload: {
rows: response.rows,
count: response.count,
},
});
} catch (error) {
Errors.handle(error);
dispatch({
type: "USERS_LIST_DELETE_ERROR",
});
}
},
doOpenConfirm: (id) => async (dispatch) => {
dispatch({
type: "USERS_LIST_OPEN_CONFIRM",
payload: {
id: id,
},
});
},
doCloseConfirm: () => async (dispatch) => {
dispatch({
type: "USERS_LIST_CLOSE_CONFIRM",
});
},
};
export default actions;
| 20.43038 | 78 | 0.538414 |
83ba0356dbd299fd00391dff361a694cdb86a1ce | 813 | js | JavaScript | public/modules/product-brands/config/product-brands.client.routes.js | kruny1001/clippers | a7d754575a7d64ce3a5d73d2ce33db2c52a3e366 | [
"MIT"
] | null | null | null | public/modules/product-brands/config/product-brands.client.routes.js | kruny1001/clippers | a7d754575a7d64ce3a5d73d2ce33db2c52a3e366 | [
"MIT"
] | null | null | null | public/modules/product-brands/config/product-brands.client.routes.js | kruny1001/clippers | a7d754575a7d64ce3a5d73d2ce33db2c52a3e366 | [
"MIT"
] | null | null | null | 'use strict';
//Setting up route
angular.module('product-brands').config(['$stateProvider',
function($stateProvider) {
// Product brands state routing
$stateProvider.
state('listProductBrands', {
url: '/product-brands',
templateUrl: 'modules/product-brands/views/list-product-brands.client.view.html'
}).
state('createProductBrand', {
url: '/product-brands/create',
templateUrl: 'modules/product-brands/views/create-product-brand.client.view.html'
}).
state('viewProductBrand', {
url: '/product-brands/:productBrandId',
templateUrl: 'modules/product-brands/views/view-product-brand.client.view.html'
}).
state('editProductBrand', {
url: '/product-brands/:productBrandId/edit',
templateUrl: 'modules/product-brands/views/edit-product-brand.client.view.html'
});
}
]); | 32.52 | 84 | 0.717097 |
83bb2d97041b0c6bd4ff30c38ca2ded395641ecd | 297 | js | JavaScript | node_modules/@iconify/icons-ant-design/src/up-outlined.js | victor131099/Hackathon2020_project | 55438887f4aac8eaa3a2d513d55b2544cb158ff7 | [
"MIT"
] | 1 | 2021-04-01T18:54:13.000Z | 2021-04-01T18:54:13.000Z | node_modules/@iconify/icons-ant-design/src/up.js | victor131099/Hackathon2020_project | 55438887f4aac8eaa3a2d513d55b2544cb158ff7 | [
"MIT"
] | null | null | null | node_modules/@iconify/icons-ant-design/src/up.js | victor131099/Hackathon2020_project | 55438887f4aac8eaa3a2d513d55b2544cb158ff7 | [
"MIT"
] | 1 | 2021-04-01T18:54:28.000Z | 2021-04-01T18:54:28.000Z | let data = {
"body": "<path d=\"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 0 0 140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z\" fill=\"currentColor\"/>",
"width": 1024,
"height": 1024
};
export default data;
| 42.428571 | 227 | 0.62963 |
83bba54c13e35ed68ddaf1e58dc10d54fa886ddb | 726 | js | JavaScript | src/api/class.js | quyuandong/sports_appay_manage_system | 9efb340b584a2577c5a7242b9c4a297c8f81d265 | [
"MIT"
] | 9 | 2020-06-23T00:07:06.000Z | 2022-03-25T03:09:47.000Z | src/api/class.js | quyuandong/sports_appay_manage_system | 9efb340b584a2577c5a7242b9c4a297c8f81d265 | [
"MIT"
] | 4 | 2020-11-30T11:30:12.000Z | 2022-02-27T07:06:01.000Z | src/api/class.js | quyuandong/sports_appay_manage_system | 9efb340b584a2577c5a7242b9c4a297c8f81d265 | [
"MIT"
] | 1 | 2022-03-12T00:11:19.000Z | 2022-03-12T00:11:19.000Z | import { get, post } from '@/utils/http';
const baseUrl = 'api/classGrade'
//添加班级
export function addClassGrade(params) {
return post(`${baseUrl}/add`,params)
}
//查询所有的班级
export function getClassGradeList(params) {
return post(`${baseUrl}/classGradeList`,params)
}
//更新当前班级
export function updateClassGrade(params) {
return post(`${baseUrl}/update`,params)
}
//删除班级
export function deleteClassGrade(params) {
return post(`${baseUrl}/delete`,params)
}
//通过releas和did sid获取当前的专业
export function findClassGradeByReleaseAndDidSid(params) {
return post(`${baseUrl}/classGradeListByReleaseAndDidSid`,params)
}
//获取到所有的班级
export function getClassGradeAll() {
return post(`${baseUrl}/classGradeAll`)
} | 21.352941 | 69 | 0.732782 |
83bc21aee7e03ccecf3ed22c0e6eced5a70bd015 | 2,211 | js | JavaScript | client/pages/myslide.js | siraom15/slide-share | 24e85a1fc9601bf1bdd0b22b54173a5caa8fe07e | [
"MIT"
] | 4 | 2021-03-24T10:59:03.000Z | 2022-02-15T10:01:06.000Z | client/pages/myslide.js | siraom15/template-share | 24e85a1fc9601bf1bdd0b22b54173a5caa8fe07e | [
"MIT"
] | 1 | 2021-03-24T18:02:10.000Z | 2021-04-01T14:51:49.000Z | client/pages/myslide.js | siraom15/template-share | 24e85a1fc9601bf1bdd0b22b54173a5caa8fe07e | [
"MIT"
] | null | null | null | // import Link from 'next/link';
import Head from 'next/head'
import { Layout, BackTop } from 'antd';
import SideBar from '../components/sidebar'
import Navbar from '../components/navbar';
const { Content, Footer } = Layout;
import MySlideComponent from '../components/myslide'
import { useEffect, useState } from 'react';
import cookies from 'js-cookie';
import { host } from '../config/server';
import { useRouter } from 'next/router';
const mySlide = () => {
const [isLoggedIn, setIsLoggedIn] = useState(false);
const router = useRouter();
useEffect(async () => {
let checkLoggedIn = async () => {
if (cookies.get('token')) {
await fetch(host + '/api/user/mydata', {
method: 'POST',
headers: {
authorization: `Bearer ${cookies.get('token')}`
}
})
.then(res => res.json())
.then(data => {
if (data.success) {
setIsLoggedIn(true);
} else {
router.push('/');
setIsLoggedIn(false);
}
})
.catch(err => {
router.push('/');
console.log(err);
setIsLoggedIn(false);
})
} else {
router.push('/');
setIsLoggedIn(false);
}
}
checkLoggedIn();
})
return (
<>
<Head>
<title>My Slide | Slide Share</title>
</Head>
<Layout >
<Navbar isLoggedIn={isLoggedIn} />
<Content>
<Layout >
<SideBar page="4" isLoggedIn={isLoggedIn} />
<Content style={{ backgroundColor: 'white' }}>
<MySlideComponent />
</Content>
</Layout>
</Content>
<BackTop />
</Layout>
</>
)
}
export default mySlide
| 32.043478 | 71 | 0.414292 |
83bcd550dbeac41a6b979d6b9f454b63b3e41663 | 1,156 | js | JavaScript | src/css.js | enjoyfuture/jquery-lite | 2103bc0aa5608ad5df31993a17fbf8ecb12c2335 | [
"MIT"
] | null | null | null | src/css.js | enjoyfuture/jquery-lite | 2103bc0aa5608ad5df31993a17fbf8ecb12c2335 | [
"MIT"
] | null | null | null | src/css.js | enjoyfuture/jquery-lite | 2103bc0aa5608ad5df31993a17fbf8ecb12c2335 | [
"MIT"
] | null | null | null | import {trim} from './core/common';
export function hasClass(element, selector) {
if (!element.getAttribute) {
return false;
}
let clazz = element.getAttribute('class') || '';
clazz = ` ${clazz} `.replace(/[\n\t]/g, ' ');
return clazz.indexOf(` ${selector} `) > -1;
}
export function removeClass(element, cssClasses) {
if (cssClasses && element.setAttribute) {
let clazz = element.getAttribute('class') || '';
clazz = ` ${clazz} `.replace(/[\n\t]/g, ' ');
cssClasses.split(' ').forEach((item) => {
element.setAttribute('class', trim(clazz.replace(` ${trim(item)} `, ' ')));
})
}
}
export function addClass(element, cssClasses) {
if (cssClasses && element.classList) {
cssClasses.split(' ').forEach((item) => {
element.classList.push(item);
});
} else if (cssClasses && element.setAttribute) {
let clazz = element.getAttribute('class') || '';
clazz = ` ${clazz} `.replace(/[\n\t]/g, ' ');
cssClasses.split(' ').forEach((item) => {
if (clazz.indexOf(` ${trim(item)} `) === -1) {
clazz += `${item} `;
}
});
element.setAttribute('class', trim(clazz));
}
} | 29.641026 | 81 | 0.576125 |
83bd2a1d46fb0fa3127702b2c46cc750d054e5c4 | 383 | js | JavaScript | src/components/Card/index.js | KirkpatrickPaul/employee_directory | 91cc8375bb3543e9447cd2610d63e491be8ac70e | [
"MIT"
] | null | null | null | src/components/Card/index.js | KirkpatrickPaul/employee_directory | 91cc8375bb3543e9447cd2610d63e491be8ac70e | [
"MIT"
] | null | null | null | src/components/Card/index.js | KirkpatrickPaul/employee_directory | 91cc8375bb3543e9447cd2610d63e491be8ac70e | [
"MIT"
] | null | null | null | import React from 'react';
import './style.css';
const Card = (props) => {
return (
<div className={`card ${props.color}`}>
<img className='image' src={props.image} alt={props.name} />
<div className='name'>{props.name}</div>
<div className='email'>{props.email}</div>
<div className='phone'>{props.phone}</div>
</div>
);
}
export default Card;
| 23.9375 | 66 | 0.600522 |
83bd979cc693bab773302672967b10c491b06f70 | 4,088 | js | JavaScript | src/components/forms/SubmitButton/SubmitButton.js | medovina/web-app | 6bc20d71e0bc9e6aeac975ba0ffa5e3e6a3c5ff5 | [
"MIT"
] | null | null | null | src/components/forms/SubmitButton/SubmitButton.js | medovina/web-app | 6bc20d71e0bc9e6aeac975ba0ffa5e3e6a3c5ff5 | [
"MIT"
] | null | null | null | src/components/forms/SubmitButton/SubmitButton.js | medovina/web-app | 6bc20d71e0bc9e6aeac975ba0ffa5e3e6a3c5ff5 | [
"MIT"
] | null | null | null | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Button from '../../widgets/FlatButton';
import { SendIcon, LoadingIcon, SuccessIcon, WarningIcon } from '../../icons';
class SubmitButton extends Component {
state = { saved: false };
componentWillUnmount() {
this.unmounted = true;
if (this.resetAfterSomeTime) {
clearTimeout(this.resetAfterSomeTime);
this.resetAfterSomeTime = undefined;
this.reset();
}
}
submit = data => {
const { handleSubmit } = this.props;
return handleSubmit(data).then(() => {
if (!this.unmounted) {
this.setState({ saved: true });
this.resetAfterSomeTime = setTimeout(this.reset, 2000);
} else {
const { reset } = this.props;
reset && reset(); // the redux form must be still reset
}
});
};
reset = () => {
const { reset } = this.props;
this.setState({ saved: false });
reset && reset();
};
getMessages() {
const { messages = {} } = this.props;
const messageDefaults = {
submit: <FormattedMessage id="generic.submit" defaultMessage="Submit" />,
success: <FormattedMessage id="generic.submitted" defaultMessage="Submitted" />,
submitting: <FormattedMessage id="generic.submitting" defaultMessage="Submitting..." />,
validating: <FormattedMessage id="generic.validating" defaultMessage="Validating..." />,
invalid: <FormattedMessage id="app.submitButton.invalid" defaultMessage="Some input is invalid." />,
};
Object.keys(messageDefaults).forEach(key => {
if (messages[key] === undefined) {
messages[key] = messageDefaults[key];
}
});
return messages;
}
render() {
const {
submitting,
hasFailed,
invalid,
asyncValidating = false,
noIcons = false,
defaultIcon = null,
disabled = false,
} = this.props;
const { saved: hasSucceeded } = this.state;
const {
submit: submitMsg,
success: successMsg,
submitting: submittingMsg,
validating: validatingMsg,
invalid: invalidMsg,
} = this.getMessages();
return (
<Button
type="submit"
onClick={data => this.submit(data)}
bsStyle={hasSucceeded ? 'success' : hasFailed ? 'danger' : invalid ? 'warning' : 'success'}
className="btn-flat"
disabled={invalid || asyncValidating !== false || submitting || disabled}>
{!submitting ? (
hasSucceeded ? (
<span>
{!noIcons && <SuccessIcon gapRight />}
{successMsg}
</span>
) : asyncValidating !== false ? (
<span>
{!noIcons && <LoadingIcon gapRight />}
{validatingMsg}
</span>
) : invalid ? (
<span>
{!noIcons && <WarningIcon gapRight />}
{invalidMsg}
</span>
) : (
<span>
{!noIcons && (defaultIcon || <SendIcon gapRight />)}
{submitMsg}
</span>
)
) : (
<span>
{!noIcons && <LoadingIcon gapRight />}
{submittingMsg}
</span>
)}
</Button>
);
}
}
SubmitButton.propTypes = {
id: PropTypes.string.isRequired,
handleSubmit: PropTypes.func.isRequired,
submitting: PropTypes.bool,
hasSucceeded: PropTypes.bool,
hasFailed: PropTypes.bool,
asyncValidating: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
noIcons: PropTypes.bool,
defaultIcon: PropTypes.any,
invalid: PropTypes.bool,
disabled: PropTypes.bool,
reset: PropTypes.func,
messages: PropTypes.shape({
submit: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
success: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
submitting: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
validating: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
}),
};
export default SubmitButton;
| 29.839416 | 106 | 0.5932 |
83bda3b99c699b276249c5060c1f934839b30539 | 12,162 | js | JavaScript | test/runner/codecept_test.js | vpazij/CodeceptJS | 5e146ddd8f3440ba374501cca25aacc4b19030d6 | [
"MIT"
] | 843 | 2020-07-15T21:30:28.000Z | 2022-03-31T06:29:10.000Z | test/runner/codecept_test.js | vpazij/CodeceptJS | 5e146ddd8f3440ba374501cca25aacc4b19030d6 | [
"MIT"
] | 950 | 2020-07-15T14:21:05.000Z | 2022-03-31T13:10:52.000Z | test/runner/codecept_test.js | vpazij/CodeceptJS | 5e146ddd8f3440ba374501cca25aacc4b19030d6 | [
"MIT"
] | 229 | 2020-07-15T21:37:49.000Z | 2022-03-31T11:19:04.000Z | const expect = require('chai').expect;
const assert = require('assert');
const path = require('path');
const exec = require('child_process').exec;
const event = require('../../lib').event;
const runner = path.join(__dirname, '/../../bin/codecept.js');
const codecept_dir = path.join(__dirname, '/../data/sandbox');
const codecept_run = `${runner} run`;
const codecept_run_config = config => `${codecept_run} --config ${codecept_dir}/${config}`;
describe('CodeceptJS Runner', () => {
before(() => {
global.codecept_dir = path.join(__dirname, '/../data/sandbox');
});
it('should be executed in current dir', (done) => {
process.chdir(codecept_dir);
exec(codecept_run, (err, stdout) => {
stdout.should.include('Filesystem'); // feature
stdout.should.include('check current dir'); // test name
assert(!err);
done();
});
});
it('should be executed with glob', (done) => {
process.chdir(codecept_dir);
exec(codecept_run_config('codecept.glob.json'), (err, stdout) => {
stdout.should.include('Filesystem'); // feature
stdout.should.include('glob current dir'); // test name
assert(!err);
done();
});
});
it('should be executed with config path', (done) => {
process.chdir(__dirname);
exec(`${codecept_run} -c ${codecept_dir}`, (err, stdout) => {
stdout.should.include('Filesystem'); // feature
stdout.should.include('check current dir'); // test name
assert(!err);
done();
});
});
it('should show failures and exit with 1 on fail', (done) => {
exec(codecept_run_config('codecept.failed.json'), (err, stdout) => {
stdout.should.include('Not-A-Filesystem');
stdout.should.include('file is not in dir');
stdout.should.include('FAILURES');
err.code.should.eql(1);
done();
});
});
describe('grep', () => {
it('filter by scenario tags', (done) => {
process.chdir(codecept_dir);
exec(`${codecept_run} --grep @slow`, (err, stdout) => {
stdout.should.include('Filesystem'); // feature
stdout.should.include('check current dir'); // test name
assert(!err);
done();
});
});
it('filter by scenario tags #2', (done) => {
process.chdir(codecept_dir);
exec(`${codecept_run} --grep @important`, (err, stdout) => {
stdout.should.include('Filesystem'); // feature
stdout.should.include('check current dir'); // test name
assert(!err);
done();
});
});
it('filter by feature tags', (done) => {
process.chdir(codecept_dir);
exec(`${codecept_run} --grep @main`, (err, stdout) => {
stdout.should.include('Filesystem'); // feature
stdout.should.include('check current dir'); // test name
assert(!err);
done();
});
});
describe('without "invert" option', () => {
it('should filter by scenario tags', (done) => {
process.chdir(codecept_dir);
exec(`${codecept_run_config('codecept.grep.2.json')} --grep @1_grep`, (err, stdout) => {
stdout.should.include('@feature_grep'); // feature
stdout.should.include('grep message 1');
stdout.should.not.include('grep message 2');
assert(!err);
done();
});
});
it('should filter by scenario tags #2', (done) => {
process.chdir(codecept_dir);
exec(`${codecept_run_config('codecept.grep.2.json')} --grep @2_grep`, (err, stdout) => {
stdout.should.include('@feature_grep'); // feature
stdout.should.include('grep message 2');
stdout.should.not.include('grep message 1');
assert(!err);
done();
});
});
it('should filter by feature tags', (done) => {
process.chdir(codecept_dir);
exec(`${codecept_run_config('codecept.grep.2.json')} --grep @feature_grep`, (err, stdout) => {
stdout.should.include('@feature_grep'); // feature
stdout.should.include('grep message 1');
stdout.should.include('grep message 2');
assert(!err);
done();
});
});
});
describe('with "invert" option', () => {
it('should filter by scenario tags', (done) => {
process.chdir(codecept_dir);
exec(`${codecept_run_config('codecept.grep.2.json')} --grep @1_grep --invert`, (err, stdout) => {
stdout.should.include('@feature_grep'); // feature
stdout.should.not.include('grep message 1');
stdout.should.include('grep message 2');
assert(!err);
done();
});
});
it('should filter by scenario tags #2', (done) => {
process.chdir(codecept_dir);
exec(`${codecept_run_config('codecept.grep.2.json')} --grep @2_grep --invert`, (err, stdout) => {
stdout.should.include('@feature_grep'); // feature
stdout.should.not.include('grep message 2');
stdout.should.include('grep message 1');
assert(!err);
done();
});
});
it('should filter by feature tags', (done) => {
process.chdir(codecept_dir);
exec(`${codecept_run_config('codecept.grep.2.json')} --grep @main --invert`, (err, stdout) => {
stdout.should.include('@feature_grep'); // feature
stdout.should.include('grep message 1');
stdout.should.include('grep message 2');
assert(!err);
done();
});
});
it('should filter by feature tags', (done) => {
process.chdir(codecept_dir);
exec(`${codecept_run_config('codecept.grep.2.json')} --grep @feature_grep --invert`, (err, stdout) => {
stdout.should.not.include('@feature_grep'); // feature
stdout.should.not.include('grep message 1');
stdout.should.not.include('grep message 2');
assert(!err);
done();
});
});
});
});
it('should run hooks from suites', (done) => {
exec(codecept_run_config('codecept.testhooks.json'), (err, stdout) => {
const lines = stdout.match(/\S.+/g);
const uniqueLines = lines.filter((v, i, a) => a.indexOf(v) === i);
expect(uniqueLines.length).to.eql(lines.length, `No duplicates in output +${lines} \n\n -${uniqueLines}`);
expect(lines).to.include.members([
'Helper: I\'m initialized',
'Helper: I\'m simple BeforeSuite hook',
'Test: I\'m simple BeforeSuite hook',
'Test: I\'m generator BeforeSuite hook',
'Test: I\'m async/await BeforeSuite hook',
'Helper: I\'m simple Before hook',
'Test: I\'m simple Before hook',
'Test: I\'m generator Before hook',
'Test: I\'m async/await Before hook',
'Test: I\'m generator After hook',
'Test: I\'m simple After hook',
'Test: I\'m async/await After hook',
'Helper: I\'m simple After hook',
'Test: I\'m generator AfterSuite hook',
'Test: I\'m simple AfterSuite hook',
'Test: I\'m async/await AfterSuite hook',
'Helper: I\'m simple AfterSuite hook',
]);
stdout.should.include('OK | 1 passed');
assert(!err);
done();
});
});
it('should run hooks from suites (in different order)', (done) => {
exec(codecept_run_config('codecept.testhooks.different.order.json'), (err, stdout) => {
const lines = stdout.match(/\S.+/g);
expect(lines).to.include.members([
'Helper: I\'m simple BeforeSuite hook',
'Test: I\'m async/await BeforeSuite hook',
'Helper: I\'m simple Before hook',
'Test: I\'m async/await Before hook',
'Test: I\'m async/await After hook',
'Helper: I\'m simple After hook',
'Test: I\'m async/await AfterSuite hook',
'Helper: I\'m simple AfterSuite hook',
]);
stdout.should.include('OK | 1 passed');
assert(!err);
done();
});
});
it('should run different types of scenario', (done) => {
exec(codecept_run_config('codecept.testscenario.json'), (err, stdout) => {
const lines = stdout.match(/\S.+/g);
expect(lines).to.include.members([
'Test scenario types --',
'It\'s usual test',
'Test: I\'m async/await test',
'Test: I\'m asyncbrackets test',
]);
stdout.should.include('OK | 3 passed');
assert(!err);
done();
});
});
it('should run dynamic config', (done) => {
exec(codecept_run_config('config.js'), (err, stdout) => {
stdout.should.include('Filesystem'); // feature
assert(!err);
done();
});
});
it('should run dynamic config with profile', (done) => {
exec(`${codecept_run_config('config.js')} --profile failed`, (err, stdout) => {
stdout.should.include('FAILURES');
stdout.should.not.include('I am bootstrap');
assert(err.code);
done();
});
});
it('should exit code 1 when error in config', (done) => {
exec(`${codecept_run_config('configs/codecept-invalid.config.js')} --profile failed`, (err, stdout, stderr) => {
stdout.should.not.include('UnhandledPromiseRejectionWarning');
stderr.should.not.include('UnhandledPromiseRejectionWarning');
stdout.should.include('badFn is not defined');
assert(err.code);
done();
});
});
describe('with require parameter', () => {
const moduleOutput = 'Module was required 1';
const moduleOutput2 = 'Module was required 2';
it('should be executed with module when described', (done) => {
process.chdir(codecept_dir);
exec(codecept_run_config('codecept.require.single.json'), (err, stdout) => {
stdout.should.include(moduleOutput);
stdout.should.not.include(moduleOutput2);
assert(!err);
done();
});
});
it('should be executed with several modules when described', (done) => {
process.chdir(codecept_dir);
exec(codecept_run_config('codecept.require.several.json'), (err, stdout) => {
stdout.should.include(moduleOutput);
stdout.should.include(moduleOutput2);
assert(!err);
done();
});
});
it('should not be executed without module when not described', (done) => {
process.chdir(codecept_dir);
exec(codecept_run_config('codecept.require.without.json'), (err, stdout) => {
stdout.should.not.include(moduleOutput);
stdout.should.not.include(moduleOutput2);
assert(!err);
done();
});
});
});
});
describe('Codeceptjs Events', () => {
it('should fire events with only passing tests', (done) => {
exec(`${codecept_run_config('codecept.testevents.js')} --grep @willpass`, (err, stdout) => {
assert(!err);
const eventMessages = stdout.split('\n')
.filter(text => text.startsWith('Event:'))
.map(text => text.replace(/^Event:/i, ''));
expect(eventMessages).to.deep.equal([
event.all.before,
event.suite.before,
event.test.before,
event.test.started,
event.test.passed,
`${event.test.passed} (helper)`,
event.test.after,
event.suite.after,
event.all.result,
event.all.after,
]);
done();
});
});
it('should fire events with passing and failing tests', (done) => {
exec(codecept_run_config('codecept.testevents.js'), (err, stdout) => {
assert(err);
const eventMessages = stdout.split('\n')
.filter(text => text.startsWith('Event:'))
.map(text => text.replace(/^Event:/i, ''));
expect(eventMessages).to.deep.equal([
event.all.before,
event.suite.before,
// Test 1 (should pass)
event.test.before,
event.test.started,
event.test.passed,
`${event.test.passed} (helper)`,
event.test.after,
// Test 2 (should fail)
event.test.before,
event.test.started,
event.test.failed,
`${event.test.failed} (helper)`,
event.test.after,
event.suite.after,
event.all.result,
event.all.after,
]);
done();
});
});
});
| 33.877437 | 116 | 0.574659 |
83bde3e572646df41440ac852bbbc594f1f50f17 | 23,594 | js | JavaScript | node_modules/handsontable/plugins/nestedRows/nestedRows.js | mingjieATuber/MandADemo | a60742c96ead6b81202ee858d065160d9e625b31 | [
"MIT"
] | null | null | null | node_modules/handsontable/plugins/nestedRows/nestedRows.js | mingjieATuber/MandADemo | a60742c96ead6b81202ee858d065160d9e625b31 | [
"MIT"
] | null | null | null | node_modules/handsontable/plugins/nestedRows/nestedRows.js | mingjieATuber/MandADemo | a60742c96ead6b81202ee858d065160d9e625b31 | [
"MIT"
] | null | null | null | "use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
require("core-js/modules/es.object.set-prototype-of.js");
require("core-js/modules/es.object.get-prototype-of.js");
require("core-js/modules/es.reflect.construct.js");
require("core-js/modules/es.reflect.get.js");
require("core-js/modules/es.object.get-own-property-descriptor.js");
require("core-js/modules/es.symbol.js");
require("core-js/modules/es.symbol.description.js");
require("core-js/modules/es.symbol.iterator.js");
require("core-js/modules/es.array.slice.js");
require("core-js/modules/es.function.name.js");
exports.__esModule = true;
exports.NestedRows = exports.PLUGIN_PRIORITY = exports.PLUGIN_KEY = void 0;
require("core-js/modules/es.array.iterator.js");
require("core-js/modules/es.object.to-string.js");
require("core-js/modules/es.string.iterator.js");
require("core-js/modules/es.weak-map.js");
require("core-js/modules/web.dom-collections.iterator.js");
require("core-js/modules/web.timers.js");
require("core-js/modules/es.array.from.js");
require("core-js/modules/es.array.reduce.js");
require("core-js/modules/web.dom-collections.for-each.js");
require("core-js/modules/es.set.js");
var _base = require("../base");
var _dataManager = _interopRequireDefault(require("./data/dataManager"));
var _collapsing = _interopRequireDefault(require("./ui/collapsing"));
var _headers = _interopRequireDefault(require("./ui/headers"));
var _contextMenu = _interopRequireDefault(require("./ui/contextMenu"));
var _console = require("../../helpers/console");
var _data = require("../../helpers/data");
var _translations = require("../../translations");
var _rowMoveController = _interopRequireDefault(require("./utils/rowMoveController"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
var PLUGIN_KEY = 'nestedRows';
exports.PLUGIN_KEY = PLUGIN_KEY;
var PLUGIN_PRIORITY = 300;
exports.PLUGIN_PRIORITY = PLUGIN_PRIORITY;
var privatePool = new WeakMap();
/**
* Error message for the wrong data type error.
*/
var WRONG_DATA_TYPE_ERROR = 'The Nested Rows plugin requires an Array of Objects as a dataset to be' + ' provided. The plugin has been disabled.';
/**
* @plugin NestedRows
* @class NestedRows
*
* @description
* Plugin responsible for displaying and operating on data sources with nested structures.
*/
var NestedRows = /*#__PURE__*/function (_BasePlugin) {
_inherits(NestedRows, _BasePlugin);
var _super = _createSuper(NestedRows);
function NestedRows(hotInstance) {
var _this;
_classCallCheck(this, NestedRows);
_this = _super.call(this, hotInstance);
/**
* Reference to the DataManager instance.
*
* @private
* @type {object}
*/
_this.dataManager = null;
/**
* Reference to the HeadersUI instance.
*
* @private
* @type {object}
*/
_this.headersUI = null;
/**
* Map of skipped rows by plugin.
*
* @private
* @type {null|TrimmingMap}
*/
_this.collapsedRowsMap = null;
privatePool.set(_assertThisInitialized(_this), {
movedToCollapsed: false,
skipRender: null,
skipCoreAPIModifiers: false
});
return _this;
}
/**
* Checks if the plugin is enabled in the handsontable settings. This method is executed in {@link Hooks#beforeInit}
* hook and if it returns `true` than the {@link NestedRows#enablePlugin} method is called.
*
* @returns {boolean}
*/
_createClass(NestedRows, [{
key: "isEnabled",
value: function isEnabled() {
return !!this.hot.getSettings()[PLUGIN_KEY];
}
/**
* Enables the plugin functionality for this Handsontable instance.
*/
}, {
key: "enablePlugin",
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
this.collapsedRowsMap = this.hot.rowIndexMapper.registerMap('nestedRows', new _translations.TrimmingMap());
this.dataManager = new _dataManager.default(this, this.hot);
this.collapsingUI = new _collapsing.default(this, this.hot);
this.headersUI = new _headers.default(this, this.hot);
this.contextMenuUI = new _contextMenu.default(this, this.hot);
this.rowMoveController = new _rowMoveController.default(this);
this.addHook('afterInit', function () {
return _this2.onAfterInit.apply(_this2, arguments);
});
this.addHook('beforeRender', function () {
return _this2.onBeforeRender.apply(_this2, arguments);
});
this.addHook('modifyRowData', function () {
return _this2.onModifyRowData.apply(_this2, arguments);
});
this.addHook('modifySourceLength', function () {
return _this2.onModifySourceLength.apply(_this2, arguments);
});
this.addHook('beforeDataSplice', function () {
return _this2.onBeforeDataSplice.apply(_this2, arguments);
});
this.addHook('beforeDataFilter', function () {
return _this2.onBeforeDataFilter.apply(_this2, arguments);
});
this.addHook('afterContextMenuDefaultOptions', function () {
return _this2.onAfterContextMenuDefaultOptions.apply(_this2, arguments);
});
this.addHook('afterGetRowHeader', function () {
return _this2.onAfterGetRowHeader.apply(_this2, arguments);
});
this.addHook('beforeOnCellMouseDown', function () {
return _this2.onBeforeOnCellMouseDown.apply(_this2, arguments);
});
this.addHook('beforeRemoveRow', function () {
return _this2.onBeforeRemoveRow.apply(_this2, arguments);
});
this.addHook('afterRemoveRow', function () {
return _this2.onAfterRemoveRow.apply(_this2, arguments);
});
this.addHook('beforeAddChild', function () {
return _this2.onBeforeAddChild.apply(_this2, arguments);
});
this.addHook('afterAddChild', function () {
return _this2.onAfterAddChild.apply(_this2, arguments);
});
this.addHook('beforeDetachChild', function () {
return _this2.onBeforeDetachChild.apply(_this2, arguments);
});
this.addHook('afterDetachChild', function () {
return _this2.onAfterDetachChild.apply(_this2, arguments);
});
this.addHook('modifyRowHeaderWidth', function () {
return _this2.onModifyRowHeaderWidth.apply(_this2, arguments);
});
this.addHook('afterCreateRow', function () {
return _this2.onAfterCreateRow.apply(_this2, arguments);
});
this.addHook('beforeRowMove', function () {
return _this2.onBeforeRowMove.apply(_this2, arguments);
});
this.addHook('beforeLoadData', function (data) {
return _this2.onBeforeLoadData(data);
});
_get(_getPrototypeOf(NestedRows.prototype), "enablePlugin", this).call(this);
}
/**
* Disables the plugin functionality for this Handsontable instance.
*/
}, {
key: "disablePlugin",
value: function disablePlugin() {
this.hot.rowIndexMapper.unregisterMap('nestedRows');
_get(_getPrototypeOf(NestedRows.prototype), "disablePlugin", this).call(this);
}
/**
* Updates the plugin state. This method is executed when {@link Core#updateSettings} is invoked.
*/
}, {
key: "updatePlugin",
value: function updatePlugin() {
this.disablePlugin();
var vanillaSourceData = this.hot.getSourceData();
this.enablePlugin();
this.dataManager.updateWithData(vanillaSourceData);
_get(_getPrototypeOf(NestedRows.prototype), "updatePlugin", this).call(this);
}
/**
* `beforeRowMove` hook callback.
*
* @private
* @param {Array} rows Array of visual row indexes to be moved.
* @param {number} finalIndex Visual row index, being a start index for the moved rows. Points to where the elements
* will be placed after the moving action. To check the visualization of the final index, please take a look at
* [documentation](@/guides/rows/row-summary.md).
* @param {undefined|number} dropIndex Visual row index, being a drop index for the moved rows. Points to where we
* are going to drop the moved elements. To check visualization of drop index please take a look at
* [documentation](@/guides/rows/row-summary.md).
* @param {boolean} movePossible Indicates if it's possible to move rows to the desired position.
* @fires Hooks#afterRowMove
* @returns {boolean}
*/
}, {
key: "onBeforeRowMove",
value: function onBeforeRowMove(rows, finalIndex, dropIndex, movePossible) {
return this.rowMoveController.onBeforeRowMove(rows, finalIndex, dropIndex, movePossible);
}
/**
* Enable the modify hook skipping flag - allows retrieving the data from Handsontable without this plugin's
* modifications.
*/
}, {
key: "disableCoreAPIModifiers",
value: function disableCoreAPIModifiers() {
var priv = privatePool.get(this);
priv.skipCoreAPIModifiers = true;
}
/**
* Disable the modify hook skipping flag.
*/
}, {
key: "enableCoreAPIModifiers",
value: function enableCoreAPIModifiers() {
var priv = privatePool.get(this);
priv.skipCoreAPIModifiers = false;
}
/**
* `beforeOnCellMousedown` hook callback.
*
* @private
* @param {MouseEvent} event Mousedown event.
* @param {object} coords Cell coords.
* @param {HTMLElement} TD Clicked cell.
*/
}, {
key: "onBeforeOnCellMouseDown",
value: function onBeforeOnCellMouseDown(event, coords, TD) {
this.collapsingUI.toggleState(event, coords, TD);
}
/**
* The modifyRowData hook callback.
*
* @private
* @param {number} row Visual row index.
* @returns {boolean}
*/
}, {
key: "onModifyRowData",
value: function onModifyRowData(row) {
var priv = privatePool.get(this);
if (priv.skipCoreAPIModifiers) {
return;
}
return this.dataManager.getDataObject(row);
}
/**
* Modify the source data length to match the length of the nested structure.
*
* @private
* @returns {number}
*/
}, {
key: "onModifySourceLength",
value: function onModifySourceLength() {
var priv = privatePool.get(this);
if (priv.skipCoreAPIModifiers) {
return;
}
return this.dataManager.countAllRows();
}
/**
* @private
* @param {number} index The index where the data was spliced.
* @param {number} amount An amount of items to remove.
* @param {object} element An element to add.
* @returns {boolean}
*/
}, {
key: "onBeforeDataSplice",
value: function onBeforeDataSplice(index, amount, element) {
var priv = privatePool.get(this);
if (priv.skipCoreAPIModifiers || this.dataManager.isRowHighestLevel(index)) {
return true;
}
this.dataManager.spliceData(index, amount, element);
return false;
}
/**
* Called before the source data filtering. Returning `false` stops the native filtering.
*
* @private
* @param {number} index The index where the data filtering starts.
* @param {number} amount An amount of rows which filtering applies to.
* @param {number} physicalRows Physical row indexes.
* @returns {boolean}
*/
}, {
key: "onBeforeDataFilter",
value: function onBeforeDataFilter(index, amount, physicalRows) {
var priv = privatePool.get(this);
this.collapsingUI.collapsedRowsStash.stash();
this.collapsingUI.collapsedRowsStash.trimStash(physicalRows[0], amount);
this.collapsingUI.collapsedRowsStash.shiftStash(physicalRows[0], null, -1 * amount);
this.dataManager.filterData(index, amount, physicalRows);
priv.skipRender = true;
return false;
}
/**
* `afterContextMenuDefaultOptions` hook callback.
*
* @private
* @param {object} defaultOptions The default context menu items order.
* @returns {boolean}
*/
}, {
key: "onAfterContextMenuDefaultOptions",
value: function onAfterContextMenuDefaultOptions(defaultOptions) {
return this.contextMenuUI.appendOptions(defaultOptions);
}
/**
* `afterGetRowHeader` hook callback.
*
* @private
* @param {number} row Row index.
* @param {HTMLElement} TH Row header element.
*/
}, {
key: "onAfterGetRowHeader",
value: function onAfterGetRowHeader(row, TH) {
this.headersUI.appendLevelIndicators(row, TH);
}
/**
* `modifyRowHeaderWidth` hook callback.
*
* @private
* @param {number} rowHeaderWidth The initial row header width(s).
* @returns {number}
*/
}, {
key: "onModifyRowHeaderWidth",
value: function onModifyRowHeaderWidth(rowHeaderWidth) {
return this.headersUI.rowHeaderWidthCache || rowHeaderWidth;
}
/**
* `onAfterRemoveRow` hook callback.
*
* @private
* @param {number} index Removed row.
* @param {number} amount Amount of removed rows.
* @param {Array} logicRows An array of the removed physical rows.
* @param {string} source Source of action.
*/
}, {
key: "onAfterRemoveRow",
value: function onAfterRemoveRow(index, amount, logicRows, source) {
var _this3 = this;
if (source === this.pluginName) {
return;
}
var priv = privatePool.get(this);
setTimeout(function () {
priv.skipRender = null;
_this3.headersUI.updateRowHeaderWidth();
_this3.collapsingUI.collapsedRowsStash.applyStash();
}, 0);
}
/**
* Callback for the `beforeRemoveRow` change list of removed physical indexes by reference. Removing parent node
* has effect in removing children nodes.
*
* @private
* @param {number} index Visual index of starter row.
* @param {number} amount Amount of rows to be removed.
* @param {Array} physicalRows List of physical indexes.
*/
}, {
key: "onBeforeRemoveRow",
value: function onBeforeRemoveRow(index, amount, physicalRows) {
var _this4 = this;
var modifiedPhysicalRows = Array.from(physicalRows.reduce(function (removedRows, physicalIndex) {
if (_this4.dataManager.isParent(physicalIndex)) {
var children = _this4.dataManager.getDataObject(physicalIndex).__children; // Preserve a parent in the list of removed rows.
removedRows.add(physicalIndex);
if (Array.isArray(children)) {
// Add a children to the list of removed rows.
children.forEach(function (child) {
return removedRows.add(_this4.dataManager.getRowIndex(child));
});
}
return removedRows;
} // Don't modify list of removed rows when already checked element isn't a parent.
return removedRows.add(physicalIndex);
}, new Set())); // Modifying hook's argument by the reference.
physicalRows.length = 0;
physicalRows.push.apply(physicalRows, _toConsumableArray(modifiedPhysicalRows));
}
/**
* `beforeAddChild` hook callback.
*
* @private
*/
}, {
key: "onBeforeAddChild",
value: function onBeforeAddChild() {
this.collapsingUI.collapsedRowsStash.stash();
}
/**
* `afterAddChild` hook callback.
*
* @private
* @param {object} parent Parent element.
* @param {object} element New child element.
*/
}, {
key: "onAfterAddChild",
value: function onAfterAddChild(parent, element) {
this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(element));
this.collapsingUI.collapsedRowsStash.applyStash();
this.headersUI.updateRowHeaderWidth();
}
/**
* `beforeDetachChild` hook callback.
*
* @private
*/
}, {
key: "onBeforeDetachChild",
value: function onBeforeDetachChild() {
this.collapsingUI.collapsedRowsStash.stash();
}
/**
* `afterDetachChild` hook callback.
*
* @private
* @param {object} parent Parent element.
* @param {object} element New child element.
*/
}, {
key: "onAfterDetachChild",
value: function onAfterDetachChild(parent, element) {
this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(element), null, -1);
this.collapsingUI.collapsedRowsStash.applyStash();
this.headersUI.updateRowHeaderWidth();
}
/**
* `afterCreateRow` hook callback.
*
* @private
* @param {number} index Represents the visual index of first newly created row in the data source array.
* @param {number} amount Number of newly created rows in the data source array.
* @param {string} source String that identifies source of hook call.
*/
}, {
key: "onAfterCreateRow",
value: function onAfterCreateRow(index, amount, source) {
if (source === this.pluginName) {
return;
}
this.dataManager.updateWithData(this.dataManager.getRawSourceData());
}
/**
* `afterInit` hook callback.
*
* @private
*/
}, {
key: "onAfterInit",
value: function onAfterInit() {
var deepestLevel = Math.max.apply(Math, _toConsumableArray(this.dataManager.cache.levels));
if (deepestLevel > 0) {
this.headersUI.updateRowHeaderWidth(deepestLevel);
}
}
/**
* `beforeRender` hook callback.
*
* @param {boolean} force Indicates if the render call was trigered by a change of settings or data.
* @param {object} skipRender An object, holder for skipRender functionality.
* @private
*/
}, {
key: "onBeforeRender",
value: function onBeforeRender(force, skipRender) {
var priv = privatePool.get(this);
if (priv.skipRender) {
skipRender.skipRender = true;
}
}
/**
* Destroys the plugin instance.
*/
}, {
key: "destroy",
value: function destroy() {
_get(_getPrototypeOf(NestedRows.prototype), "destroy", this).call(this);
}
/**
* `beforeLoadData` hook callback.
*
* @param {Array} data The source data.
* @private
*/
}, {
key: "onBeforeLoadData",
value: function onBeforeLoadData(data) {
if (!(0, _data.isArrayOfObjects)(data)) {
(0, _console.error)(WRONG_DATA_TYPE_ERROR);
this.disablePlugin();
return;
}
this.dataManager.setData(data);
this.dataManager.rewriteCache();
}
}], [{
key: "PLUGIN_KEY",
get: function get() {
return PLUGIN_KEY;
}
}, {
key: "PLUGIN_PRIORITY",
get: function get() {
return PLUGIN_PRIORITY;
}
}]);
return NestedRows;
}(_base.BasePlugin);
exports.NestedRows = NestedRows; | 35.426426 | 427 | 0.665847 |
83bdf4f93bd46d01d0edaa4a6c3709ea890fd77e | 6,636 | js | JavaScript | node_modules/broccoli-filter/index.js | zubeir68/my-library-client | e3264a31721957feb4799c6b5ce085cc52175d80 | [
"MIT"
] | 9 | 2015-03-06T03:31:32.000Z | 2018-07-22T18:45:17.000Z | node_modules/broccoli-filter/index.js | zubeir68/my-library-client | e3264a31721957feb4799c6b5ce085cc52175d80 | [
"MIT"
] | 33 | 2015-02-01T20:57:32.000Z | 2018-02-24T14:03:06.000Z | node_modules/broccoli-filter/index.js | zubeir68/my-library-client | e3264a31721957feb4799c6b5ce085cc52175d80 | [
"MIT"
] | 21 | 2015-03-12T20:11:32.000Z | 2021-03-26T11:31:24.000Z | 'use strict';
var fs = require('fs');
var path = require('path');
var mkdirp = require('mkdirp');
var Promise = require('rsvp').Promise;
var Plugin = require('broccoli-plugin');
var helpers = require('broccoli-kitchen-sink-helpers');
var walkSync = require('walk-sync');
var mapSeries = require('promise-map-series');
var symlinkOrCopySync = require('symlink-or-copy').sync;
var copyDereferenceSync = require('copy-dereference').sync;
var Cache = require('./lib/cache');
var debugGenerator = require('debug');
var keyForFile = require('./lib/key-for-file');
module.exports = Filter;
Filter.prototype = Object.create(Plugin.prototype);
Filter.prototype.constructor = Filter;
function Filter(inputTree, options) {
if (!this || !(this instanceof Filter) ||
Object.getPrototypeOf(this) === Filter.prototype) {
throw new TypeError('Filter is an abstract class and must be sub-classed');
}
var name = 'broccoli-filter:' + (this.constructor.name);
if (this.description) {
name += ' > [' + this.description + ']';
}
this._debug = debugGenerator(name);
Plugin.call(this, [inputTree]);
if (options) {
if (options.extensions != null)
this.extensions = options.extensions;
if (options.targetExtension != null)
this.targetExtension = options.targetExtension;
// For encodings, `null` (buffers) is distinct from the default (UTF-8)
if (options.inputEncoding !== undefined)
this.inputEncoding = options.inputEncoding;
if (options.outputEncoding !== undefined)
this.outputEncoding = options.outputEncoding;
}
this._cache = new Cache();
this._canProcessCache = Object.create(null);
this._destFilePathCache = Object.create(null);
}
Filter.prototype.build = function build() {
var self = this;
var srcDir = this.inputPaths[0];
var destDir = this.outputPath;
var paths = walkSync(srcDir);
this._cache.deleteExcept(paths).forEach(function(key) {
fs.unlinkSync(this.cachePath + '/' + key);
}, this);
return mapSeries(paths, function rebuildEntry(relativePath) {
var destPath = destDir + '/' + relativePath;
if (relativePath.slice(-1) === '/') {
mkdirp.sync(destPath);
} else {
if (self.canProcessFile(relativePath)) {
return self.processAndCacheFile(srcDir, destDir, relativePath);
} else {
var srcPath = srcDir + '/' + relativePath;
symlinkOrCopySync(srcPath, destPath);
}
}
});
};
Filter.prototype.canProcessFile =
function canProcessFile(relativePath) {
return !!this.getDestFilePath(relativePath);
};
Filter.prototype.getDestFilePath = function getDestFilePath(relativePath) {
if (this.extensions == null) return relativePath;
for (var i = 0, ii = this.extensions.length; i < ii; ++i) {
var ext = this.extensions[i];
if (relativePath.slice(-ext.length - 1) === '.' + ext) {
if (this.targetExtension != null) {
relativePath =
relativePath.slice(0, -ext.length) + this.targetExtension;
}
return relativePath;
}
}
return null;
}
Filter.prototype.processAndCacheFile =
function processAndCacheFile(srcDir, destDir, relativePath) {
var self = this;
var cacheEntry = this._cache.get(relativePath);
var outputRelativeFile = self.getDestFilePath(relativePath);
if (cacheEntry) {
var hashResult = hash(srcDir, cacheEntry.inputFile);
if (cacheEntry.hash.hash === hashResult.hash) {
this._debug('cache hit: %s', relativePath);
return symlinkOrCopyFromCache(cacheEntry, destDir, outputRelativeFile);
} else {
this._debug('cache miss: %s \n - previous: %o \n - next: %o ', relativePath, cacheEntry.hash.key, hashResult.key);
}
} else {
this._debug('cache prime: %s', relativePath);
}
return Promise.resolve().
then(function asyncProcessFile() {
return self.processFile(srcDir, destDir, relativePath);
}).
then(copyToCache,
// TODO(@caitp): error wrapper is for API compat, but is not particularly
// useful.
// istanbul ignore next
function asyncProcessFileErrorWrapper(e) {
if (typeof e !== 'object' || e === null) e = new Error('' + e);
e.file = relativePath;
e.treeDir = srcDir;
throw e;
})
function copyToCache() {
var entry = {
hash: hash(srcDir, relativePath),
inputFile: relativePath,
outputFile: destDir + '/' + outputRelativeFile,
cacheFile: self.cachePath + '/' + outputRelativeFile
};
if (fs.existsSync(entry.cacheFile)) {
fs.unlinkSync(entry.cacheFile);
} else {
mkdirp.sync(path.dirname(entry.cacheFile));
}
copyDereferenceSync(entry.outputFile, entry.cacheFile);
return self._cache.set(relativePath, entry);
}
};
Filter.prototype.processFile =
function processFile(srcDir, destDir, relativePath) {
var self = this;
var inputEncoding = this.inputEncoding;
var outputEncoding = this.outputEncoding;
if (inputEncoding === undefined) inputEncoding = 'utf8';
if (outputEncoding === undefined) outputEncoding = 'utf8';
var contents = fs.readFileSync(
srcDir + '/' + relativePath, { encoding: inputEncoding });
return Promise.resolve(this.processString(contents, relativePath)).
then(function asyncOutputFilteredFile(outputString) {
var outputPath = self.getDestFilePath(relativePath);
if (outputPath == null) {
throw new Error('canProcessFile("' + relativePath + '") is true, but getDestFilePath("' + relativePath + '") is null');
}
outputPath = destDir + '/' + outputPath;
mkdirp.sync(path.dirname(outputPath));
fs.writeFileSync(outputPath, outputString, {
encoding: outputEncoding
});
});
};
Filter.prototype.processString =
function unimplementedProcessString(contents, relativePath) {
throw new Error(
'When subclassing broccoli-filter you must implement the ' +
'`processString()` method.');
};
function hash(src, filePath) {
var path = src + '/' + filePath;
var key = keyForFile(path);
return {
key: key,
hash: helpers.hashStrings([
path,
key.size,
key.mode,
key.mtime
])
};
}
function symlinkOrCopyFromCache(entry, dest, relativePath) {
try {
symlinkOrCopySync(entry.cacheFile, dest + '/' + relativePath);
} catch(err) {
if (err.code === 'ENOENT') {
// assume that the destination directory is missing create it and retry
mkdirp.sync(path.dirname(entry.outputFile))
symlinkOrCopySync(entry.cacheFile, dest + '/' + relativePath)
} else {
throw err;
}
}
}
| 31.009346 | 129 | 0.660187 |
83be2a4d02847e5ba6063a2cd0b0592f1c089d12 | 5,505 | js | JavaScript | src/js/scripts/components/lines.js | vorobjovsh/myrank | bfb028d6f88d08dec9db7161de356ad3a16386aa | [
"MIT"
] | null | null | null | src/js/scripts/components/lines.js | vorobjovsh/myrank | bfb028d6f88d08dec9db7161de356ad3a16386aa | [
"MIT"
] | null | null | null | src/js/scripts/components/lines.js | vorobjovsh/myrank | bfb028d6f88d08dec9db7161de356ad3a16386aa | [
"MIT"
] | null | null | null | const jsMenu = document.querySelector(".uservisible-str.adminvisible-str");
const jsMenuUser = document.querySelector(".uservisible-str.js-uservisible-str");
const divisionBlock = jsMenu.parentNode;
const divisionBlockUser = jsMenuUser.parentNode;
let lastDivisionBlock = jsMenu.lastElementChild;
let lastDivisionBlockUser = jsMenuUser.lastElementChild;
const arrSublist = document.querySelectorAll(".adminvisible-str .uservisible-str__sublist");
/*arrSublist.forEach(function(item, i) {
item.classList.add(`js-sublist-${i}`);
});*/
for (var i = 0; i < arrSublist.length; i++) {
arrSublist[i].classList.add(`js-sublist-${i}`);
}
const arrSublistUser = document.querySelectorAll(".js-uservisible-str .uservisible-str__sublist");
/*arrSublistUser.forEach(function(item, i) {
item.classList.add(`js-sublistuser-${i}`);
});*/
for (var i = 0; i < arrSublistUser.length; i++) {
arrSublistUser[i].classList.add(`js-sublistuser-${i}`);
}
function topPositions() {
let lineTop;
let lineBottom;
let lineBottomCorrect;
let heightLine;
let style = document.createElement('style');
if(maket7.classList.contains("js-block")) {
lineTop = getCoords(divisionBlock).top;
lineBottom = getCoords(lastDivisionBlock).top;
lineBottomCorrect = lineBottom + 24;
heightLine = lineBottomCorrect - lineTop;
style.innerHTML = '.uservisible-str.adminvisible-str::before {height: ' + heightLine + 'px;}';
document.querySelector('head').appendChild(style);
}
if(maket8.classList.contains("js-block")) {
lineTop = getCoords(divisionBlockUser).top;
lineBottom = getCoords(lastDivisionBlockUser).top;
lineBottomCorrect = lineBottom + 26;
heightLine = lineBottomCorrect - lineTop;
style.innerHTML = '.uservisible-str.js-uservisible-str::before {height: ' + heightLine + 'px;}';
document.querySelector('head').appendChild(style);
}
}
function getCoords(elem) { // кроме IE8-
var box = elem.getBoundingClientRect();
return {
top: box.top + pageYOffset,
left: box.left + pageXOffset
};
}
function addSubLines() {
let wicon = $(window).width();
if(maket7.classList.contains("js-block")) {
// Так как в IE forEach не работает, то делаем через for
/*arrSublist.forEach(function(item, i) {
let lineTopSub = getCoords(item).top;
let lineTopSubCorrect = lineTopSub - 6;
if(wicon > 767) {
lineTopSubCorrect = lineTopSub;
}
let lineBottomEl = item.lastElementChild;
let lineBottomSub = getCoords(lineBottomEl).top;
let lineBottomSubCorrect = lineBottomSub + 24;
if(wicon > 767) {
lineBottomSubCorrect = lineBottomSub - 1;
}
let heightLineSub = lineBottomSubCorrect - lineTopSubCorrect;
let style = document.createElement('style');
style.innerHTML = '.uservisible-str__sublist.js-sublist-' + i + '::before {height: ' + heightLineSub + 'px;}';
document.querySelector('head').appendChild(style);
});*/
for (var i = 0; i < arrSublist.length; i++) {
let lineTopSub = getCoords(arrSublist[i]).top;
let lineTopSubCorrect = lineTopSub - 6;
if(wicon > 767) {
lineTopSubCorrect = lineTopSub;
}
let lineBottomEl = arrSublist[i].lastElementChild;
let lineBottomSub = getCoords(lineBottomEl).top;
let lineBottomSubCorrect = lineBottomSub + 24;
if(wicon > 767) {
lineBottomSubCorrect = lineBottomSub - 1;
}
let heightLineSub = lineBottomSubCorrect - lineTopSubCorrect;
let style = document.createElement('style');
style.innerHTML = '.uservisible-str__sublist.js-sublist-' + i + '::before {height: ' + heightLineSub + 'px;}';
document.querySelector('head').appendChild(style);
}
}
if(maket8.classList.contains("js-block")) {
// Так как в IE forEach не работает, то делаем через for
/*arrSublistUser.forEach(function(item, i) {
let lineTopSub = getCoords(item).top;
let lineTopSubCorrect = lineTopSub - 6;
if(wicon > 767) {
lineTopSubCorrect = lineTopSub;
}
let lineBottomEl = item.lastElementChild;
let lineBottomSub = getCoords(lineBottomEl).top;
let lineBottomSubCorrect = lineBottomSub + 26;
if(wicon > 767) {
lineBottomSubCorrect = lineBottomSub + 1;
}
let heightLineSub = lineBottomSubCorrect - lineTopSubCorrect;
let style = document.createElement('style');
style.innerHTML = '.uservisible-str__sublist.js-sublistuser-' + i + '::before {height: ' + heightLineSub + 'px;}';
document.querySelector('head').appendChild(style);
});*/
for (var i = 0; i < arrSublistUser.length; i++) {
let lineTopSub = getCoords(arrSublistUser[i]).top;
let lineTopSubCorrect = lineTopSub - 6;
if(wicon > 767) {
lineTopSubCorrect = lineTopSub;
}
let lineBottomEl = arrSublistUser[i].lastElementChild;
let lineBottomSub = getCoords(lineBottomEl).top;
let lineBottomSubCorrect = lineBottomSub + 26;
if(wicon > 767) {
lineBottomSubCorrect = lineBottomSub + 1;
}
let heightLineSub = lineBottomSubCorrect - lineTopSubCorrect;
let style = document.createElement('style');
style.innerHTML = '.uservisible-str__sublist.js-sublistuser-' + i + '::before {height: ' + heightLineSub + 'px;}';
document.querySelector('head').appendChild(style);
}
}
}
| 26.723301 | 120 | 0.663579 |
83be73fca9f4c0772332f11569d7e62805a022a8 | 9,447 | js | JavaScript | packages/ranges-process-outside/test/test.js | avigoldman/codsen | bb52dff3589256e4a27f5020f637f20f9f847a4b | [
"MIT"
] | 63 | 2021-01-31T04:14:48.000Z | 2022-03-22T23:51:41.000Z | packages/ranges-process-outside/test/test.js | avigoldman/codsen | bb52dff3589256e4a27f5020f637f20f9f847a4b | [
"MIT"
] | 40 | 2021-01-28T01:49:44.000Z | 2022-03-31T14:57:32.000Z | packages/ranges-process-outside/test/test.js | avigoldman/codsen | bb52dff3589256e4a27f5020f637f20f9f847a4b | [
"MIT"
] | 8 | 2021-03-02T03:23:50.000Z | 2022-01-21T16:06:04.000Z | import tap from "tap";
import { rProcessOutside as p } from "../dist/ranges-process-outside.esm.js";
const femaleWhiteSleuthEmoji = "\uD83D\uDD75\uD83C\uDFFC\u200D\u2640\uFE0F";
// ==============================
// 0. THROWS
// ==============================
// throw pinning:
tap.test(
`01 - ${`\u001b[${35}m${`throws`}\u001b[${39}m`} - first arg wrong #1`,
(t) => {
t.throws(() => {
p(undefined, [[0, 1]]);
}, /THROW_ID_01/g);
t.end();
}
);
tap.test(
`02 - ${`\u001b[${35}m${`throws`}\u001b[${39}m`} - first arg wrong #2`,
(t) => {
t.throws(() => {
p(null, [[0, 1]]);
}, /THROW_ID_02/g);
t.end();
}
);
tap.test(
`03 - ${`\u001b[${35}m${`throws`}\u001b[${39}m`} - first arg wrong #3`,
(t) => {
t.throws(() => {
p(true, [[0, 1]]);
}, /THROW_ID_02/g);
t.end();
}
);
tap.test(
`04 - ${`\u001b[${35}m${`throws`}\u001b[${39}m`} - second arg wrong #4`,
(t) => {
// throw pinning:
t.throws(() => {
p("zzz", true);
}, /THROW_ID_03/g);
t.end();
}
);
tap.test(
`05 - ${`\u001b[${35}m${`throws`}\u001b[${39}m`} - second arg wrong #5`,
(t) => {
t.throws(() => {
p("zzz", ["zzz"], () => {});
}, /THROW_ID_03/g);
t.end();
}
);
tap.test(
`06 - ${`\u001b[${35}m${`throws`}\u001b[${39}m`} - second arg null means absence of ranges`,
(t) => {
t.doesNotThrow(() => {
p("zzz", null, () => {});
}, "06");
t.end();
}
);
tap.test(
`07 - ${`\u001b[${35}m${`throws`}\u001b[${39}m`} - third arg wrong`,
(t) => {
// throw pinning:
t.throws(() => {
p("zzz", [[0, 1]], null);
}, /THROW_ID_04/g);
t.end();
}
);
// ==============================
// 01. Normal use
// ==============================
tap.test(
`08 - ${`\u001b[${33}m${`one range`}\u001b[${39}m`} - string covers ranges - not touching zero - checks`,
(t) => {
const gather = [];
p("abcdefghij", [[1, 5]], (idx) => {
gather.push(idx);
});
t.strictSame(gather, [0, 5, 6, 7, 8, 9], "08");
t.end();
}
);
tap.test(
`09 - ${`\u001b[${33}m${`one range`}\u001b[${39}m`} - string covers ranges - not touching zero - skip checks`,
(t) => {
const gather2 = [];
p(
"abcdefghij",
[[1, 5]],
(idx) => {
gather2.push(idx);
},
true
);
t.strictSame(gather2, [0, 5, 6, 7, 8, 9], "09");
t.end();
}
);
tap.test(
`10 - ${`\u001b[${33}m${`one range`}\u001b[${39}m`} - string covers ranges - touching zero - 1 range - checks`,
(t) => {
const gather = [];
p("abcdefghij", [[0, 5]], (idx) => {
gather.push(idx);
});
t.strictSame(gather, [5, 6, 7, 8, 9], "10");
t.end();
}
);
tap.test(
`11 - ${`\u001b[${33}m${`one range`}\u001b[${39}m`} - string covers ranges - touching zero - 1 range - skip checks`,
(t) => {
const gathe2 = [];
p(
"abcdefghij",
[[0, 5]],
(idx) => {
gathe2.push(idx);
},
true
);
t.strictSame(gathe2, [5, 6, 7, 8, 9], "11");
t.end();
}
);
tap.test(
`12 - ${`\u001b[${31}m${`few ranges`}\u001b[${39}m`} - string covers ranges - touching zero - 2 ranges`,
(t) => {
const gather = [];
p(
"abcdefghij",
[
[0, 5],
[7, 8],
],
(idx) => {
gather.push(idx);
}
);
t.strictSame(gather, [5, 6, 8, 9], "12");
t.end();
}
);
tap.test(
`13 - ${`\u001b[${31}m${`few ranges`}\u001b[${39}m`} - string covers ranges - touching zero - opposite order (testing ranges-merge)`,
(t) => {
const gather2 = [];
const messy = [
[7, 8],
[0, 5],
];
p("abcdefghij", messy, (idx) => {
gather2.push(idx);
});
t.strictSame(
messy,
[
[7, 8],
[0, 5],
],
"13.01 - inputs were not mutated"
);
t.strictSame(
gather2,
[5, 6, 8, 9],
"13.02 - result is the same as in previous test"
);
t.end();
}
);
tap.test(
`14 - ${`\u001b[${31}m${`few ranges`}\u001b[${39}m`} - string covers ranges - touching zero - throws`,
(t) => {
// skipping checking/merges/sorts will trigger safety latches and cause a throw
const gather2 = [];
t.throws(() => {
p(
"abcdefghij",
[
[7, 8],
[0, 5],
],
(idx) => {
gather2.push(idx);
},
true
);
}, /THROW_ID_08/g);
t.end();
}
);
// range outside the string length
tap.test(
`15 - ${`\u001b[${31}m${`few ranges`}\u001b[${39}m`} - string covers ranges - touching zero - protrudes - with checks`,
(t) => {
const gather = [];
p(
"abcdefghij",
[
[0, 5],
[7, 100],
],
(idx) => {
gather.push(idx);
}
);
t.strictSame(gather, [5, 6], "15 - result is the same as in previous test");
t.end();
}
);
tap.test(
`16 - ${`\u001b[${31}m${`few ranges`}\u001b[${39}m`} - string covers ranges - touching zero - protrudes - with checks skip`,
(t) => {
const gather = [];
// The problem is, reference string is 10 chars/indexes long and ranges span
// up to index 100. In practice, on a clean input this should never happen so
// it is safe and worthy to cut corners and skip checks. For example, this
// index 100 would not come at the first place if we processed the same string
// even on many different iterations and different functions. That index 100
// can't appear from anywhere if reference string's indexes don't span that far.
t.throws(() => {
p(
"abcdefghij",
[
[0, 5],
[7, 100],
],
(idx) => {
gather.push(idx);
},
true
);
}, /THROW_ID_08/g);
t.end();
}
);
tap.test(
`17 - ${`\u001b[${33}m${`one range`}\u001b[${39}m`} - absent ranges - empty array given`,
(t) => {
const gather = [];
p("abcdefghij", [], (idx) => {
gather.push(idx);
});
t.strictSame(gather, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "17");
t.end();
}
);
tap.test(
`18 - ${`\u001b[${33}m${`one range`}\u001b[${39}m`} - absent ranges - null given`,
(t) => {
const gather2 = [];
p("abcdefghij", null, (idx) => {
gather2.push(idx);
});
t.strictSame(gather2, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "18");
t.end();
}
);
tap.test(
`19 - ${`\u001b[${33}m${`one range`}\u001b[${39}m`} - absent ranges - null given + true (skip checks)`,
(t) => {
const gather = [];
p(
"abcdefghij",
null,
(idx) => {
gather.push(idx);
},
true
);
t.strictSame(gather, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "19");
t.end();
}
);
tap.test(
`20 - ${`\u001b[${33}m${`one range`}\u001b[${39}m`} - ranges completely cover str`,
(t) => {
const gather1 = [];
p("abcdefghij", [[0, 100]], (idx) => {
gather1.push(idx);
});
t.strictSame(gather1, [], "20");
t.end();
}
);
tap.test(
`21 - ${`\u001b[${33}m${`one range`}\u001b[${39}m`} - ranges not cover str at all`,
(t) => {
const gather = [];
p("abcdefghij", [[100, 200]], (idx) => {
gather.push(idx);
});
t.strictSame(gather, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "21");
t.end();
}
);
tap.test(
`22 - ${`\u001b[${33}m${`one range`}\u001b[${39}m`} - string covers ranges - emoji - checks on`,
(t) => {
const gather = [];
p(
`abcdef\uD834\uDF06ij`,
[[0, 5]],
(idxFrom, idxTo) => {
gather.push([idxFrom, idxTo]);
},
false // skip=false so checks are on
);
t.strictSame(
gather,
[
[5, 6],
[6, 8],
[8, 9],
[9, 10],
],
"22"
);
t.end();
}
);
tap.test(
`23 - ${`\u001b[${33}m${`one range`}\u001b[${39}m`} - string covers ranges - emoji - checks on`,
(t) => {
t.equal(femaleWhiteSleuthEmoji.length, 7, "23.01 - sanity check");
const gather = [];
p(
`abcdef${femaleWhiteSleuthEmoji}ij`,
[[0, 5]],
(idxFrom, idxTo) => {
gather.push([idxFrom, idxTo]);
},
false // skip=false so checks are on
);
t.strictSame(
gather,
[
[5, 6],
[6, 13],
[13, 14],
[14, 15],
],
"23.02"
);
t.end();
}
);
// ==============================
// 02. Index offsets
// ==============================
tap.test(
`24 - ${`\u001b[${35}m${`offsets`}\u001b[${39}m`} - offset once at index 5`,
(t) => {
const gather = [];
p("abcdefghij", [[1, 5]], (idxFrom, idxTo, offsetBy) => {
gather.push(idxFrom);
if (idxFrom === 5) {
offsetBy(1);
}
});
t.strictSame(gather, [0, 5, 7, 8, 9], "24");
t.end();
}
);
tap.test(
`25 - ${`\u001b[${35}m${`offsets`}\u001b[${39}m`} - offset once at index 6`,
(t) => {
const gather = [];
p("abcdefghij", [[1, 5]], (idxFrom, idxTo, offsetBy) => {
gather.push(idxFrom);
if (idxFrom === 6) {
offsetBy(1);
}
});
t.strictSame(gather, [0, 5, 6, 8, 9], "25");
t.end();
}
);
tap.test(
`26 - ${`\u001b[${35}m${`offsets`}\u001b[${39}m`} - sequential offsets`,
(t) => {
const gather = [];
p("abcdefghij", [[1, 5]], (idxFrom, idxTo, offsetBy) => {
if (idxFrom === 5 || idxFrom === 6) {
offsetBy(1);
} else {
gather.push(idxFrom);
}
});
t.strictSame(gather, [0, 7, 8, 9], "26");
t.end();
}
);
| 22.07243 | 135 | 0.454748 |
83be9e7415b16cc6998196ebafc8474ac8786f61 | 1,040 | js | JavaScript | dist/src/locutus/src/php/var/doubleval.js | dimaslanjaka/php-universal-framework | 3d145c86cb83920a7dc37c4e75d024fa3a20e73f | [
"MIT"
] | 3 | 2020-07-04T08:42:08.000Z | 2020-07-05T05:17:19.000Z | dist/src/locutus/src/php/var/doubleval.js | dimaslanjaka/php-universal-framework | 3d145c86cb83920a7dc37c4e75d024fa3a20e73f | [
"MIT"
] | 9 | 2020-06-18T09:37:39.000Z | 2020-10-10T14:07:43.000Z | dist/src/locutus/src/php/var/doubleval.js | dimaslanjaka/php-universal-framework | 3d145c86cb83920a7dc37c4e75d024fa3a20e73f | [
"MIT"
] | 1 | 2020-06-18T09:33:06.000Z | 2020-06-18T09:33:06.000Z | module.exports = function doubleval(mixedVar) {
// discuss at: https://locutus.io/php/doubleval/
// original by: Brett Zamir (https://brett-zamir.me)
// note 1: 1.0 is simplified to 1 before it can be accessed by the function, this makes
// note 1: it different from the PHP implementation. We can't fix this unfortunately.
// example 1: doubleval(186)
// returns 1: 186.00
var floatval = require('../var/floatval');
return floatval(mixedVar);
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG91YmxldmFsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zcmMvbG9jdXR1cy9zcmMvcGhwL3Zhci9kb3VibGV2YWwuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLE9BQU8sR0FBRyxTQUFTLFNBQVMsQ0FBRSxRQUFRO0lBQzNDLGlEQUFpRDtJQUNqRCxvREFBb0Q7SUFDcEQsNEZBQTRGO0lBQzVGLDBGQUEwRjtJQUMxRiw4QkFBOEI7SUFDOUIsc0JBQXNCO0lBRXRCLElBQUksUUFBUSxHQUFHLE9BQU8sQ0FBQyxpQkFBaUIsQ0FBQyxDQUFBO0lBRXpDLE9BQU8sUUFBUSxDQUFDLFFBQVEsQ0FBQyxDQUFBO0FBQzNCLENBQUMsQ0FBQSJ9 | 94.545455 | 546 | 0.828846 |
83bee11d530b22c624c9d68bc9a72518c32d86f1 | 2,145 | js | JavaScript | services/application/src/actions/user/login.js | zarathustra323/id-me | 07c5e859518dd0b50d2406f21835996390892edb | [
"MIT"
] | null | null | null | services/application/src/actions/user/login.js | zarathustra323/id-me | 07c5e859518dd0b50d2406f21835996390892edb | [
"MIT"
] | null | null | null | services/application/src/actions/user/login.js | zarathustra323/id-me | 07c5e859518dd0b50d2406f21835996390892edb | [
"MIT"
] | null | null | null | const { createError } = require('micro');
const { createRequiredParamError } = require('@base-cms/micro').service;
const { tokenService } = require('@base-cms/id-me-service-clients');
const { Application, AppUserLogin } = require('../../mongodb/models');
const findByEmail = require('./find-by-email');
module.exports = async ({
applicationId,
token,
ip,
ua,
} = {}) => {
if (!token) throw createRequiredParamError('token');
if (!applicationId) throw createRequiredParamError('applicationId');
const app = await Application.findById(applicationId, ['id']);
if (!app) throw createError(404, `No application was found for '${applicationId}'`);
const {
aud: email,
iss,
jti,
fields: input = {},
} = await tokenService.request('verify', { sub: 'app-user-login-link', token });
if (!email) throw createError(400, 'No email address was provided in the token payload');
if (!iss) throw createError(400, 'No application ID was provided in the token payload');
if (iss !== applicationId) throw createError(400, 'The requested application ID does not match the token payload');
const user = await findByEmail({ applicationId, email });
if (!user) throw createError(404, `No user was found for '${email}'`);
// Create the authenticated token.
const { token: authToken, payload } = await tokenService.request('create', {
sub: 'app-user-auth',
iss: applicationId,
payload: { aud: user.email },
});
// Invalidate the login link token (but do not await)
tokenService.request('invalidate', { jti });
// Save the login with the auth token ID (but do not await)
AppUserLogin.create({
applicationId,
email: user.email,
tokenId: payload.jti,
ip,
ua,
});
// Update the user with last logged in, verified, and any fields provided on the token.
const toUpdate = Object.keys(input).filter(field => field !== 'email').reduce((o, field) => ({ ...o, [field]: input[field] }), {
verified: true,
lastLoggedIn: new Date(),
});
user.set(toUpdate);
await user.save();
return { user: user.toObject(), token: { id: payload.jti, value: authToken } };
};
| 33.515625 | 130 | 0.665268 |
83befe89cffc180ad475894ae4c07b74d1f992d0 | 4,613 | js | JavaScript | alloy/controllers/allproduct-item.js | eduardo2219/nacmedic | 51d14429bda00d2d9993b86295fbc14e0211f639 | [
"Apache-2.0"
] | null | null | null | alloy/controllers/allproduct-item.js | eduardo2219/nacmedic | 51d14429bda00d2d9993b86295fbc14e0211f639 | [
"Apache-2.0"
] | null | null | null | alloy/controllers/allproduct-item.js | eduardo2219/nacmedic | 51d14429bda00d2d9993b86295fbc14e0211f639 | [
"Apache-2.0"
] | null | null | null | function __processArg(obj, key) {
var arg = null;
if (obj) {
arg = obj[key] || null;
delete obj[key];
}
return arg;
}
function Controller() {
require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
this.__controllerPath = "allproduct-item";
this.args = arguments[0] || {};
if (arguments[0]) {
{
__processArg(arguments[0], "__parentSymbol");
}
{
__processArg(arguments[0], "$model");
}
{
__processArg(arguments[0], "__itemTemplate");
}
}
var $ = this;
var exports = {};
$.__views.mainView = Ti.UI.createView({
width: Ti.UI.FILL,
height: Ti.UI.SIZE,
layout: "vertical",
backgroundColor: "transparent",
zIndex: 0,
id: "mainView"
});
$.__views.mainView && $.addTopLevelView($.__views.mainView);
$.__views.thumb_contaner = Ti.UI.createView({
width: Ti.UI.FILL,
height: Ti.UI.SIZE,
id: "thumb_contaner"
});
$.__views.mainView.add($.__views.thumb_contaner);
$.__views.featured = Ti.UI.createImageView(function() {
var o = {};
_.extend(o, {
top: 0,
left: 0,
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
image: "/featured.png",
zIndex: 1
});
Alloy.isHandheld && _.extend(o, {
width: "60%",
height: Ti.UI.SIZE
});
_.extend(o, {
id: "featured"
});
return o;
}());
$.__views.thumb_contaner.add($.__views.featured);
$.__views.p_regular_price = Ti.UI.createLabel({
zIndex: 1,
top: 10,
right: 5,
height: Titanium.UI.SIZE,
width: 70,
color: "#fff",
font: {
fontSize: 13,
fontFamily: Alloy.CFG.fontFamily
},
backgroundColor: "#44c163",
borderColor: "#44c163",
borderRadius: 5,
borderWidth: 1,
textAlign: "center",
id: "p_regular_price"
});
$.__views.thumb_contaner.add($.__views.p_regular_price);
$.__views.p_sale_price = Ti.UI.createLabel({
zIndex: 1,
top: 30,
right: 5,
height: Titanium.UI.SIZE,
width: 70,
color: "#fff",
font: {
fontSize: 15,
fontFamily: Alloy.CFG.fontFamily
},
backgroundColor: "#ff5a54",
borderColor: "#ff5a54",
borderRadius: 5,
borderWidth: 1,
textAlign: "center",
id: "p_sale_price"
});
$.__views.thumb_contaner.add($.__views.p_sale_price);
$.__views.p_image = Ti.UI.createImageView({
top: 0,
width: Ti.UI.FILL,
height: Ti.UI.SIZE,
borderRadius: 3,
id: "p_image"
});
$.__views.thumb_contaner.add($.__views.p_image);
$.__views.p_title = Ti.UI.createLabel({
top: 10,
height: Ti.UI.SIZE,
width: Ti.UI.FILL,
color: "#444444",
font: {
fontSize: 14,
fontFamily: Alloy.CFG.fontFamily
},
wordWrap: true,
id: "p_title"
});
$.__views.mainView.add($.__views.p_title);
$.__views.p_rate = Ti.UI.createView({
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
id: "p_rate"
});
$.__views.mainView.add($.__views.p_rate);
$.__views.__alloyId1 = Ti.UI.createView({
width: Ti.UI.FILL,
height: 10,
id: "__alloyId1"
});
$.__views.mainView.add($.__views.__alloyId1);
exports.destroy = function() {};
_.extend($, $.__views);
var args = arguments[0] || {};
$.p_title.text = args.title;
$.p_regular_price.text = (args.regular_price > 0 ? args.regular_price : args.price) + " " + Alloy.CFG.config.currency_format;
$.p_sale_price.text = args.sale_price + " " + Alloy.CFG.config.currency_format;
$.p_image.image = args.image;
$.p_rate.add(Alloy.createWidget("com.hashapps.tirate", {
rate: args.average_rating
}).getView());
$.featured.visible = args.featured ? true : false;
$.p_sale_price.visible = args.sale_price ? true : false;
if ("ltr" == Alloy.CFG.config.direction) {
$.p_title.left = 5;
$.p_title.textAlign = "left";
$.p_rate.right = 5;
} else {
$.p_title.right = 5;
$.p_title.textAlign = "right";
$.p_rate.left = 5;
}
_.extend($, exports);
}
var Alloy = require("alloy"), Backbone = Alloy.Backbone, _ = Alloy._;
module.exports = Controller; | 29.012579 | 129 | 0.53501 |
83bf2db14897b229909347aa18fd2900a6785f2a | 148 | js | JavaScript | Just Run/src/states/victoriae.js | KaceGameDev/Just-Run | d67ccbaf5c38e4cab42f59a8d2f8cb02f562cdd2 | [
"Apache-2.0"
] | 1 | 2019-01-10T16:52:39.000Z | 2019-01-10T16:52:39.000Z | Just Run/src/states/victoriae.js | KaceGameDev/Just-Run | d67ccbaf5c38e4cab42f59a8d2f8cb02f562cdd2 | [
"Apache-2.0"
] | null | null | null | Just Run/src/states/victoriae.js | KaceGameDev/Just-Run | d67ccbaf5c38e4cab42f59a8d2f8cb02f562cdd2 | [
"Apache-2.0"
] | null | null | null | var victoriaEState = function(Just_Run) {
victoriaEState.prototype.create = function(){
this.background = game.add.sprite(0,0,'victoriae');
}
} | 29.6 | 53 | 0.72973 |
83bfb951b825197c45f5ad0fe795ad0a5654a53d | 3,873 | js | JavaScript | demo-mobile/demo-elements/tabs/demo-tabs.js | openbap/obap-elements | 2eb47c1b2a354540616c238e6d7210c792d9c69a | [
"MIT"
] | 11 | 2020-07-09T08:48:22.000Z | 2022-03-18T05:40:11.000Z | demo-mobile/demo-elements/tabs/demo-tabs.js | openbap/obap-elements | 2eb47c1b2a354540616c238e6d7210c792d9c69a | [
"MIT"
] | 3 | 2020-09-15T08:16:33.000Z | 2022-02-13T12:32:31.000Z | demo-mobile/demo-elements/tabs/demo-tabs.js | openbap/obap-elements | 2eb47c1b2a354540616c238e6d7210c792d9c69a | [
"MIT"
] | 1 | 2020-07-09T22:36:06.000Z | 2020-07-09T22:36:06.000Z | /*
@license
Copyright (c) 2021 Paul H Mason. All rights reserved.
*/
import { html, css, ObapElement } from '../../../src/obap-element/obap-element.js';
//import { subtitle } from '../../../src/obap-styles/obap-typography.js';
import '../../../src/obap-tabs/obap-tabs.js';
import '../../demo-mobile-app/demo-panel.js';
export class DemoTabs extends ObapElement {
static get styles() {
return [css`
:host {
display: block;
height: 100%;
width: 100%;
max-width: 100%;
padding: 8px;
box-sizing: border-box;
overflow: hidden;
}
:host([hidden]) {
display: none !important;
}
:host([disabled]) {
pointer-events: none;
}
obap-tabs {
}
demo-panel {
margin-bottom: 8px;
max-width: 100%;
box-sizing: border-box;
}
demo-panel:last-of-type {
margin-bottom: 0;
}
.container {
height: 100%;
display: flex;
flex-direction: column;
align-content: stretch;
overflow-y: auto;
}
.temp {
height: 64px;
background: lightyellow;
width: 1000px;
}
`];
}
render() {
return html`
<div class="container">
<demo-panel label="Regular Tabs">
<obap-tabs selected-index="0">
<obap-tab>Tab 1</obap-tab>
<obap-tab>Tab 2</obap-tab>
<obap-tab>Tab 3</obap-tab>
<obap-tab>Tab 4</obap-tab>
<obap-tab>Tab 5</obap-tab>
</obap-tabs>
</demo-panel>
<demo-panel label="Fill Tabs">
<obap-tabs fill selected-index="0">
<obap-tab>Tab 1</obap-tab>
<obap-tab>Tab 2</obap-tab>
<obap-tab>Tab 3</obap-tab>
</obap-tabs>
</demo-panel>
<demo-panel label="Scrolling Tabs">
<obap-tabs scroll selected-index="0">
<obap-tab>Tab 1</obap-tab>
<obap-tab>Tab 2</obap-tab>
<obap-tab>Tab 3</obap-tab>
<obap-tab>Tab 4</obap-tab>
<obap-tab>Tab 5</obap-tab>
<obap-tab>Tab 6</obap-tab>
<obap-tab>Tab 7</obap-tab>
<obap-tab>Tab 8</obap-tab>
<obap-tab>Tab 9</obap-tab>
<obap-tab>Tab 10</obap-tab>
</obap-tabs>
</demo-panel>
<demo-panel label="Scrolling Tabs - No Buttons">
<obap-tabs scroll hide-scroll-buttons selected-index="0">
<obap-tab>Tab 1</obap-tab>
<obap-tab>Tab 2</obap-tab>
<obap-tab>Tab 3</obap-tab>
<obap-tab>Tab 4</obap-tab>
<obap-tab>Tab 5</obap-tab>
<obap-tab>Tab 6</obap-tab>
<obap-tab>Tab 7</obap-tab>
<obap-tab>Tab 8</obap-tab>
<obap-tab>Tab 9</obap-tab>
<obap-tab>Tab 10</obap-tab>
</obap-tabs>
</demo-panel>
</div>
`;
}
}
window.customElements.define('demo-tabs', DemoTabs); | 32.822034 | 83 | 0.39117 |
83c005834880aede2523e618393a55f82ea1ff32 | 4,739 | js | JavaScript | test/EmiPrice.test.js | EMISWAP-COM-INT/emiswap | 306519b226f3113e006ef8e6f8c8c80999aaa8d1 | [
"MIT"
] | null | null | null | test/EmiPrice.test.js | EMISWAP-COM-INT/emiswap | 306519b226f3113e006ef8e6f8c8c80999aaa8d1 | [
"MIT"
] | null | null | null | test/EmiPrice.test.js | EMISWAP-COM-INT/emiswap | 306519b226f3113e006ef8e6f8c8c80999aaa8d1 | [
"MIT"
] | null | null | null | // eslint-disable-next-line no-unused-vars
const { accounts, defaultSender } = require('@openzeppelin/test-environment');
const { ether, time, expectEvent, expectRevert } = require('@openzeppelin/test-helpers');
const { default: BigNumber } = require('bignumber.js');
const { assert } = require('chai');
const { contract } = require('./twrapper');
const UniswapV2Factory = contract.fromArtifact('UniswapV2Factory');
const UniswapV2Pair = contract.fromArtifact('UniswapV2Pair');
const MockUSDX = contract.fromArtifact('MockUSDX');
const MockUSDY = contract.fromArtifact('MockUSDY');
const MockUSDZ = contract.fromArtifact('MockUSDZ');
const MockWETH = contract.fromArtifact('MockWETH');
const MockWBTC = contract.fromArtifact('MockWBTC');
const EmiPrice = contract.fromArtifact('EmiPrice');
const { web3 } = MockUSDX;
MockUSDX.numberFormat = 'String';
// eslint-disable-next-line import/order
const { BN } = web3.utils;
let uniswapFactory;
let uniswapPair;
let uPair;
let usdx;
let usdy;
let usdz;
let weth;
let wbtc;
let vamp;
const money = {
ether,
eth: ether,
zero: ether('0'),
weth: ether,
dai: ether,
usdx: ether,
usdy: (value) => ether(value).div(new BN (1e10)),
usdc: (value) => ether(value).div(new BN (1e12)),
wbtc: (value) => ether(value).div(new BN (1e10)),
};
/**
*Token Decimals
V ETH (18)
USDT (6)
USDB (18)
V USDC (6)
V DAI (18)
V EMRX (8)
V WETH (18)
v WBTC (8)
renBTC (8)
*/
describe('EmiPrice test', function () {
const [TestOwner, alice, bob, clarc, dave, eve, george, henry, ivan] = accounts;
beforeEach(async function () {
uniswapFactory = await UniswapV2Factory.new(TestOwner);
usdx = await MockUSDX.new();
usdy = await MockUSDY.new();
usdz = await MockUSDZ.new();
weth = await MockWETH.new();
wbtc = await MockWBTC.new();
price = await EmiPrice.new();
await price.initialize(uniswapFactory.address, uniswapFactory.address, uniswapFactory.address, weth.address);
/* USDX - USDZ pair (DAI - USDC) */
await uniswapFactory.createPair(weth.address, usdz.address);
const pairAddress = await uniswapFactory.getPair(weth.address, usdz.address);
uniswapPair = await UniswapV2Pair.at(pairAddress);
/* USDX - WETH pair (DAI - ETH) */
await uniswapFactory.createPair(usdx.address, weth.address);
const pairAddressUSDX_WETH = await uniswapFactory.getPair(usdx.address, weth.address);
uniswapPairUSDX_WETH = await UniswapV2Pair.at(pairAddressUSDX_WETH);
const wethToPair = new BN(100).mul(new BN(10).pow(new BN(await usdx.decimals()))).toString();
const usdzToPair = new BN(101).mul(new BN(10).pow(new BN(await usdz.decimals()))).toString();
const usdxToPair_USDXWETH = new BN(400).mul(new BN(10).pow(new BN(await usdx.decimals()))).toString();
const wethToPair_USDXWETH = new BN(1).mul(new BN(10).pow(new BN(await weth.decimals()))).toString();
await weth.deposit({ value: wethToPair });
await weth.transfer(uniswapPair.address, wethToPair);
await usdz.transfer(uniswapPair.address, usdzToPair);
await uniswapPair.mint(alice);
let ttt = new BN(wethToPair);
let ttt2 = new BN(usdzToPair);
await weth.deposit({ value: ttt.mul(new BN(10)).toString()});
await weth.transfer(uniswapPair.address, ttt.mul(new BN(10)).toString());
await usdz.transfer(uniswapPair.address, ttt2.mul(new BN(10)).toString());
await uniswapPair.mint(bob);
await weth.deposit({ value: ttt.mul(new BN(30)).toString() });
await weth.transfer(uniswapPair.address, ttt.mul(new BN(30)).toString());
await usdz.transfer(uniswapPair.address, ttt2.mul(new BN(30)).toString());
await uniswapPair.mint(dave);
await usdx.transfer(bob, usdxToPair_USDXWETH);
await usdx.transfer(uniswapPairUSDX_WETH.address, usdxToPair_USDXWETH);
await weth.deposit({ value: wethToPair_USDXWETH });
await weth.transfer(uniswapPairUSDX_WETH.address, wethToPair_USDXWETH);
await uniswapPairUSDX_WETH.mint(alice);
});
describe('get prices of coins', ()=> {
it('should get prices successfully', async function () {
let b = await price.getCoinPrices([usdx.address, usdz.address], 1);
console.log('Got price results: %s, %s', b[0].toString(), b[1].toString());
let p0 = parseFloat(b[0].toString(10)) / 100000;
let p1 = parseFloat(b[1].toString(10)) / 100000;
console.log('Price calc: %f, %f', p0, p1);
assert.equal(b.length, 2);
assert.isAbove(p0, 0);
assert.isAtLeast(p1, 0);
});
});
});
| 36.453846 | 117 | 0.657312 |
83c00b986a4dce55e84b9fd65adafc16043bbc9e | 46,564 | js | JavaScript | src/lib/extensions.js | GwenTastic/sugarcube-2 | 797a60231c4018839ca1093b964022bdbe307acd | [
"BSD-2-Clause"
] | null | null | null | src/lib/extensions.js | GwenTastic/sugarcube-2 | 797a60231c4018839ca1093b964022bdbe307acd | [
"BSD-2-Clause"
] | null | null | null | src/lib/extensions.js | GwenTastic/sugarcube-2 | 797a60231c4018839ca1093b964022bdbe307acd | [
"BSD-2-Clause"
] | null | null | null | /***********************************************************************************************************************
lib/extensions.js
Copyright © 2013–2020 Thomas Michael Edwards <thomasmedwards@gmail.com>. All rights reserved.
Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file.
***********************************************************************************************************************/
/* global Patterns */
/*
JavaScript Polyfills.
NOTE: The ES5 and ES6 polyfills come from the vendored `es5-shim.js` and `es6-shim.js` libraries.
*/
(() => {
'use strict';
/*******************************************************************************************************************
Utility Functions.
*******************************************************************************************************************/
/*
Trims whitespace from either the start or end of the given string.
*/
const _trimString = (() => {
// Whitespace regular expressions.
const startWSRe = new RegExp(`^${Patterns.space}${Patterns.space}*`);
const endWSRe = new RegExp(`${Patterns.space}${Patterns.space}*$`);
function trimString(str, where) {
const val = String(str);
if (!val) {
return val;
}
switch (where) {
case 'start':
return startWSRe.test(val) ? val.replace(startWSRe, '') : val;
case 'end':
return endWSRe.test(val) ? val.replace(endWSRe, '') : val;
default:
throw new Error(`_trimString called with incorrect where parameter value: "${where}"`);
}
}
return trimString;
})();
/*
Generates a pad string based upon the given string and length.
*/
function _createPadString(length, padding) {
const targetLength = Number.parseInt(length, 10) || 0;
if (targetLength < 1) {
return '';
}
let padString = typeof padding === 'undefined' ? '' : String(padding);
if (padString === '') {
padString = ' ';
}
while (padString.length < targetLength) {
const curPadLength = padString.length;
const remainingLength = targetLength - curPadLength;
padString += curPadLength > remainingLength
? padString.slice(0, remainingLength)
: padString;
}
if (padString.length > targetLength) {
padString = padString.slice(0, targetLength);
}
return padString;
}
/*******************************************************************************************************************
Polyfills.
*******************************************************************************************************************/
/*
[ES2019] Returns a new array consisting of the source array with all sub-array elements
concatenated into it recursively up to the given depth.
*/
if (!Array.prototype.flat) {
Object.defineProperty(Array.prototype, 'flat', {
configurable : true,
writable : true,
value : (() => {
function flat(/* depth */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.flat called on null or undefined');
}
const depth = arguments.length === 0 ? 1 : Number(arguments[0]) || 0;
if (depth < 1) {
return Array.prototype.slice.call(this);
}
return Array.prototype.reduce.call(
this,
(acc, cur) => {
if (cur instanceof Array) {
// acc.push.apply(acc, flat.call(cur, depth - 1));
acc.push(...flat.call(cur, depth - 1));
}
else {
acc.push(cur);
}
return acc;
},
[]
);
}
return flat;
})()
});
}
/*
[ES2019] Returns a new array consisting of the result of calling the given mapping function
on every element in the source array and then concatenating all sub-array elements into it
recursively up to a depth of `1`. Identical to calling `<Array>.map(fn).flat()`.
*/
if (!Array.prototype.flatMap) {
Object.defineProperty(Array.prototype, 'flatMap', {
configurable : true,
writable : true,
value(/* callback [, thisArg] */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.flatMap called on null or undefined');
}
return Array.prototype.map.apply(this, arguments).flat();
}
});
}
/*
[ES2016] Returns whether the given element was found within the array.
*/
if (!Array.prototype.includes) {
Object.defineProperty(Array.prototype, 'includes', {
configurable : true,
writable : true,
value(/* needle [, fromIndex] */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.includes called on null or undefined');
}
if (arguments.length === 0) {
return false;
}
const length = this.length >>> 0;
if (length === 0) {
return false;
}
const needle = arguments[0];
let i = Number(arguments[1]) || 0;
if (i < 0) {
i = Math.max(0, length + i);
}
for (/* empty */; i < length; ++i) {
const value = this[i];
if (value === needle || value !== value && needle !== needle) {
return true;
}
}
return false;
}
});
}
/*
[ES2017] Returns a new array consisting of the given object's own enumerable property/value
pairs as `[key, value]` arrays.
*/
if (!Object.entries) {
Object.defineProperty(Object, 'entries', {
configurable : true,
writable : true,
value(obj) {
if (typeof obj !== 'object' || obj === null) {
throw new TypeError('Object.entries object parameter must be an object');
}
return Object.keys(obj).map(key => [key, obj[key]]);
}
});
}
/*
[ES2019] Returns a new generic object consisting of the given list's key/value pairs.
*/
if (!Object.fromEntries) {
Object.defineProperty(Object, 'fromEntries', {
configurable : true,
writable : true,
value(iter) {
return Array.from(iter).reduce(
(acc, pair) => {
if (Object(pair) !== pair) {
throw new TypeError('Object.fromEntries iterable parameter must yield objects');
}
if (pair[0] in acc) {
Object.defineProperty(acc, pair[0], {
configurable : true,
enumerable : true,
writable : true,
value : pair[1]
});
}
else {
acc[pair[0]] = pair[1]; // eslint-disable-line no-param-reassign
}
return acc;
},
{}
);
}
});
}
/*
[ES2017] Returns all own property descriptors of the given object.
*/
if (!Object.getOwnPropertyDescriptors) {
Object.defineProperty(Object, 'getOwnPropertyDescriptors', {
configurable : true,
writable : true,
value(obj) {
if (obj == null) { // lazy equality for null
throw new TypeError('Object.getOwnPropertyDescriptors object parameter is null or undefined');
}
const O = Object(obj);
return Reflect.ownKeys(O).reduce(
(acc, key) => {
const desc = Object.getOwnPropertyDescriptor(O, key);
if (typeof desc !== 'undefined') {
if (key in acc) {
Object.defineProperty(acc, key, {
configurable : true,
enumerable : true,
writable : true,
value : desc
});
}
else {
acc[key] = desc; // eslint-disable-line no-param-reassign
}
}
return acc;
},
{}
);
}
});
}
/*
[ES2017] Returns a new array consisting of the given object's own enumerable property values.
*/
if (!Object.values) {
Object.defineProperty(Object, 'values', {
configurable : true,
writable : true,
value(obj) {
if (typeof obj !== 'object' || obj === null) {
throw new TypeError('Object.values object parameter must be an object');
}
return Object.keys(obj).map(key => obj[key]);
}
});
}
/*
[ES2017] Returns a string based on concatenating the given padding, repeated as necessary,
to the start of the string so that the given length is reached.
NOTE: This pads based upon Unicode code units, rather than code points.
*/
if (!String.prototype.padStart) {
Object.defineProperty(String.prototype, 'padStart', {
configurable : true,
writable : true,
value(length, padding) {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.padStart called on null or undefined');
}
const baseString = String(this);
const baseLength = baseString.length;
const targetLength = Number.parseInt(length, 10);
if (targetLength <= baseLength) {
return baseString;
}
return _createPadString(targetLength - baseLength, padding) + baseString;
}
});
}
/*
[ES2017] Returns a string based on concatenating the given padding, repeated as necessary,
to the end of the string so that the given length is reached.
NOTE: This pads based upon Unicode code units, rather than code points.
*/
if (!String.prototype.padEnd) {
Object.defineProperty(String.prototype, 'padEnd', {
configurable : true,
writable : true,
value(length, padding) {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.padEnd called on null or undefined');
}
const baseString = String(this);
const baseLength = baseString.length;
const targetLength = Number.parseInt(length, 10);
if (targetLength <= baseLength) {
return baseString;
}
return baseString + _createPadString(targetLength - baseLength, padding);
}
});
}
/*
[ES2019] Returns a string with all whitespace removed from the start of the string.
*/
if (!String.prototype.trimStart) {
Object.defineProperty(String.prototype, 'trimStart', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.trimStart called on null or undefined');
}
return _trimString(this, 'start');
}
});
}
if (!String.prototype.trimLeft) {
Object.defineProperty(String.prototype, 'trimLeft', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.trimLeft called on null or undefined');
}
return _trimString(this, 'start');
}
});
}
/*
[ES2019] Returns a string with all whitespace removed from the end of the string.
*/
if (!String.prototype.trimEnd) {
Object.defineProperty(String.prototype, 'trimEnd', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.trimEnd called on null or undefined');
}
return _trimString(this, 'end');
}
});
}
if (!String.prototype.trimRight) {
Object.defineProperty(String.prototype, 'trimRight', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.trimRight called on null or undefined');
}
return _trimString(this, 'end');
}
});
}
})();
/*
JavaScript Extensions.
*/
(() => {
'use strict';
const _nativeMathRandom = Math.random;
/*******************************************************************************************************************
Utility Functions.
*******************************************************************************************************************/
/*
Returns a pseudo-random whole number (integer) within the given bounds.
*/
function _random(/* [min ,] max */) {
let min;
let max;
switch (arguments.length) {
case 0:
throw new Error('_random called with insufficient parameters');
case 1:
min = 0;
max = arguments[0];
break;
default:
min = arguments[0];
max = arguments[1];
break;
}
if (min > max) {
[min, max] = [max, min];
}
return Math.floor(_nativeMathRandom() * (max - min + 1)) + min;
}
/*
Returns a randomly selected index within the given length and bounds.
Bounds may be negative.
*/
function _randomIndex(length, boundsArgs) {
let min;
let max;
switch (boundsArgs.length) {
case 1:
min = 0;
max = length - 1;
break;
case 2:
min = 0;
max = Math.trunc(boundsArgs[1]);
break;
default:
min = Math.trunc(boundsArgs[1]);
max = Math.trunc(boundsArgs[2]);
break;
}
if (Number.isNaN(min)) {
min = 0;
}
else if (!Number.isFinite(min) || min >= length) {
min = length - 1;
}
else if (min < 0) {
min = length + min;
if (min < 0) {
min = 0;
}
}
if (Number.isNaN(max)) {
max = 0;
}
else if (!Number.isFinite(max) || max >= length) {
max = length - 1;
}
else if (max < 0) {
max = length + max;
if (max < 0) {
max = length - 1;
}
}
return _random(min, max);
}
/*
Returns an object (`{ char, start, end }`) containing the Unicode character at
position `pos`, its starting position, and its ending position—surrogate pairs
are properly handled. If `pos` is out-of-bounds, returns an object containing
the empty string and start/end positions of `-1`.
This function is necessary because JavaScript strings are sequences of UTF-16
code units, so surrogate pairs are exposed and thus must be handled. While the
ES6/2015 standard does improve the situation somewhat, it does not alleviate
the need for this function.
NOTE: Will throw exceptions on invalid surrogate pairs.
IDEA: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt
*/
function _getCodePointStartAndEnd(str, pos) {
const code = str.charCodeAt(pos);
// Given position was out-of-bounds.
if (Number.isNaN(code)) {
return { char : '', start : -1, end : -1 };
}
// Code unit is not a UTF-16 surrogate.
if (code < 0xD800 || code > 0xDFFF) {
return {
char : str.charAt(pos),
start : pos,
end : pos
};
}
// Code unit is a high surrogate (D800–DBFF).
if (code >= 0xD800 && code <= 0xDBFF) {
const nextPos = pos + 1;
// End of string.
if (nextPos >= str.length) {
throw new Error('high surrogate without trailing low surrogate');
}
const nextCode = str.charCodeAt(nextPos);
// Next code unit is not a low surrogate (DC00–DFFF).
if (nextCode < 0xDC00 || nextCode > 0xDFFF) {
throw new Error('high surrogate without trailing low surrogate');
}
return {
char : str.charAt(pos) + str.charAt(nextPos),
start : pos,
end : nextPos
};
}
// Code unit is a low surrogate (DC00–DFFF) in the first position.
if (pos === 0) {
throw new Error('low surrogate without leading high surrogate');
}
const prevPos = pos - 1;
const prevCode = str.charCodeAt(prevPos);
// Previous code unit is not a high surrogate (D800–DBFF).
if (prevCode < 0xD800 || prevCode > 0xDBFF) {
throw new Error('low surrogate without leading high surrogate');
}
return {
char : str.charAt(prevPos) + str.charAt(pos),
start : prevPos,
end : pos
};
}
/*******************************************************************************************************************
Extensions, General.
*******************************************************************************************************************/
/*
Randomly selects an element from the given array, or array-like object, and returns it.
[DEPRECATED] Optionally, from within the given bounds.
*/
Object.defineProperty(Array, 'random', {
configurable : true,
writable : true,
value(array /* DEPRECATED: [, [min ,] max] */) {
if (
typeof array !== 'object'
|| array === null
|| !Object.prototype.hasOwnProperty.call(array, 'length')
) {
throw new TypeError('Array.random array parameter must be an array or array-lke object');
}
const length = array.length >>> 0;
if (length === 0) {
return;
}
const index = arguments.length === 0
? _random(0, length - 1)
: _randomIndex(length, Array.prototype.slice.call(arguments, 1));
return array[index];
}
});
/*
Concatenates one or more unique elements to the end of the base array
and returns the result as a new array. Elements which are arrays will
be merged—i.e. their elements will be concatenated, rather than the
array itself.
*/
Object.defineProperty(Array.prototype, 'concatUnique', {
configurable : true,
writable : true,
value(/* variadic */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.concatUnique called on null or undefined');
}
const result = Array.from(this);
if (arguments.length === 0) {
return result;
}
const items = Array.prototype.reduce.call(arguments, (prev, cur) => prev.concat(cur), []);
const addSize = items.length;
if (addSize === 0) {
return result;
}
const indexOf = Array.prototype.indexOf;
const push = Array.prototype.push;
for (let i = 0; i < addSize; ++i) {
const value = items[i];
if (indexOf.call(result, value) === -1) {
push.call(result, value);
}
}
return result;
}
});
/*
Returns the number of times the given element was found within the array.
*/
Object.defineProperty(Array.prototype, 'count', {
configurable : true,
writable : true,
value(/* needle [, fromIndex ] */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.count called on null or undefined');
}
const indexOf = Array.prototype.indexOf;
const needle = arguments[0];
let pos = Number(arguments[1]) || 0;
let count = 0;
while ((pos = indexOf.call(this, needle, pos)) !== -1) {
++count;
++pos;
}
return count;
}
});
/*
Removes and returns all of the given elements from the array.
*/
Object.defineProperty(Array.prototype, 'delete', {
configurable : true,
writable : true,
value(/* needles */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.delete called on null or undefined');
}
if (arguments.length === 0) {
return [];
}
const length = this.length >>> 0;
if (length === 0) {
return [];
}
const needles = Array.prototype.concat.apply([], arguments);
const needlesLength = needles.length;
const indices = [];
for (let i = 0; i < length; ++i) {
const value = this[i];
for (let j = 0; j < needlesLength; ++j) {
const needle = needles[j];
if (value === needle || value !== value && needle !== needle) {
indices.push(i);
break;
}
}
}
const result = [];
// Copy the elements (in original order).
for (let i = 0, iend = indices.length; i < iend; ++i) {
result[i] = this[indices[i]];
}
const splice = Array.prototype.splice;
// Delete the elements (in reverse order).
for (let i = indices.length - 1; i >= 0; --i) {
splice.call(this, indices[i], 1);
}
return result;
}
});
/*
Removes and returns all of the elements at the given indices from the array.
*/
Object.defineProperty(Array.prototype, 'deleteAt', {
configurable : true,
writable : true,
value(/* indices */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.deleteAt called on null or undefined');
}
if (arguments.length === 0) {
return [];
}
const length = this.length >>> 0;
if (length === 0) {
return [];
}
const splice = Array.prototype.splice;
const cpyIndices = [
...new Set(
Array.prototype.concat.apply([], arguments)
// Map negative indices to their positive counterparts,
// so the Set can properly filter out duplicates.
.map(x => x < 0 ? Math.max(0, length + x) : x)
).values()
];
const delIndices = [...cpyIndices].sort((a, b) => b - a);
const result = [];
// Copy the elements (in originally specified order).
for (let i = 0, iend = cpyIndices.length; i < iend; ++i) {
result[i] = this[cpyIndices[i]];
}
// Delete the elements (in descending numeric order).
for (let i = 0, iend = delIndices.length; i < iend; ++i) {
splice.call(this, delIndices[i], 1);
}
return result;
}
});
/*
Removes and returns all of the elements that pass the test implemented
by the given predicate function from the array.
*/
Object.defineProperty(Array.prototype, 'deleteWith', {
configurable : true,
writable : true,
value(predicate, thisArg) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.deleteWith called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new Error('Array.prototype.deleteWith predicate parameter must be a function');
}
const length = this.length >>> 0;
if (length === 0) {
return [];
}
const splice = Array.prototype.splice;
const indices = [];
const result = [];
// Copy the elements (in original order).
for (let i = 0; i < length; ++i) {
if (predicate.call(thisArg, this[i], i, this)) {
result.push(this[i]);
indices.push(i);
}
}
// Delete the elements (in reverse order).
for (let i = indices.length - 1; i >= 0; --i) {
splice.call(this, indices[i], 1);
}
return result;
}
});
/*
Returns the first element from the array.
*/
Object.defineProperty(Array.prototype, 'first', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.first called on null or undefined');
}
const length = this.length >>> 0;
if (length === 0) {
return;
}
return this[0];
}
});
/*
Returns whether all of the given elements were found within the array.
*/
Object.defineProperty(Array.prototype, 'includesAll', {
configurable : true,
writable : true,
value(/* needles */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.includesAll called on null or undefined');
}
if (arguments.length === 1) {
if (Array.isArray(arguments[0])) {
return Array.prototype.includesAll.apply(this, arguments[0]);
}
return Array.prototype.includes.apply(this, arguments);
}
for (let i = 0, iend = arguments.length; i < iend; ++i) {
if (
!Array.prototype.some.call(this, function (val) {
return val === this.val || val !== val && this.val !== this.val;
}, { val : arguments[i] })
) {
return false;
}
}
return true;
}
});
/*
Returns whether any of the given elements were found within the array.
*/
Object.defineProperty(Array.prototype, 'includesAny', {
configurable : true,
writable : true,
value(/* needles */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.includesAny called on null or undefined');
}
if (arguments.length === 1) {
if (Array.isArray(arguments[0])) {
return Array.prototype.includesAny.apply(this, arguments[0]);
}
return Array.prototype.includes.apply(this, arguments);
}
for (let i = 0, iend = arguments.length; i < iend; ++i) {
if (
Array.prototype.some.call(this, function (val) {
return val === this.val || val !== val && this.val !== this.val;
}, { val : arguments[i] })
) {
return true;
}
}
return false;
}
});
/*
Returns the last element from the array.
*/
Object.defineProperty(Array.prototype, 'last', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.last called on null or undefined');
}
const length = this.length >>> 0;
if (length === 0) {
return;
}
return this[length - 1];
}
});
/*
Randomly removes an element from the base array and returns it.
[DEPRECATED] Optionally, from within the given bounds.
*/
Object.defineProperty(Array.prototype, 'pluck', {
configurable : true,
writable : true,
value(/* DEPRECATED: [min ,] max */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.pluck called on null or undefined');
}
const length = this.length >>> 0;
if (length === 0) {
return;
}
const index = arguments.length === 0
? _random(0, length - 1)
: _randomIndex(length, [...arguments]);
return Array.prototype.splice.call(this, index, 1)[0];
}
});
/*
Randomly removes the given number of unique elements from the base array
and returns the removed elements as a new array.
*/
Object.defineProperty(Array.prototype, 'pluckMany', {
configurable : true,
writable : true,
value(wantSize) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.pluckMany called on null or undefined');
}
const length = this.length >>> 0;
if (length === 0) {
return [];
}
let want = Math.trunc(wantSize);
if (!Number.isInteger(want)) {
throw new Error('Array.prototype.pluckMany want parameter must be an integer');
}
if (want < 1) {
return [];
}
if (want > length) {
want = length;
}
const splice = Array.prototype.splice;
const result = [];
let max = length - 1;
do {
result.push(splice.call(this, _random(0, max--), 1)[0]);
} while (result.length < want);
return result;
}
});
/*
Appends one or more unique elements to the end of the base array and
returns its new length.
*/
Object.defineProperty(Array.prototype, 'pushUnique', {
configurable : true,
writable : true,
value(/* variadic */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.pushUnique called on null or undefined');
}
const addSize = arguments.length;
if (addSize === 0) {
return this.length >>> 0;
}
const indexOf = Array.prototype.indexOf;
const push = Array.prototype.push;
for (let i = 0; i < addSize; ++i) {
const value = arguments[i];
if (indexOf.call(this, value) === -1) {
push.call(this, value);
}
}
return this.length >>> 0;
}
});
/*
Randomly selects an element from the base array and returns it.
[DEPRECATED] Optionally, from within the given bounds.
*/
Object.defineProperty(Array.prototype, 'random', {
configurable : true,
writable : true,
value(/* DEPRECATED: [min ,] max */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.random called on null or undefined');
}
const length = this.length >>> 0;
if (length === 0) {
return;
}
const index = arguments.length === 0
? _random(0, length - 1)
: _randomIndex(length, [...arguments]);
return this[index];
}
});
/*
Randomly selects the given number of unique elements from the base array
and returns the selected elements as a new array.
*/
Object.defineProperty(Array.prototype, 'randomMany', {
configurable : true,
writable : true,
value(wantSize) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.randomMany called on null or undefined');
}
const length = this.length >>> 0;
if (length === 0) {
return [];
}
let want = Math.trunc(wantSize);
if (!Number.isInteger(want)) {
throw new Error('Array.prototype.randomMany want parameter must be an integer');
}
if (want < 1) {
return [];
}
if (want > length) {
want = length;
}
const picked = new Map();
const result = [];
const max = length - 1;
do {
let i;
do {
i = _random(0, max);
} while (picked.has(i));
picked.set(i, true);
result.push(this[i]);
} while (result.length < want);
return result;
}
});
/*
Randomly shuffles the array and returns it.
*/
Object.defineProperty(Array.prototype, 'shuffle', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.shuffle called on null or undefined');
}
const length = this.length >>> 0;
if (length === 0) {
return this;
}
for (let i = length - 1; i > 0; --i) {
const j = Math.floor(_nativeMathRandom() * (i + 1));
if (i === j) {
continue;
}
// [this[i], this[j]] = [this[j], this[i]];
const swap = this[i];
this[i] = this[j];
this[j] = swap;
}
return this;
}
});
/*
Prepends one or more unique elements to the beginning of the base array
and returns its new length.
*/
Object.defineProperty(Array.prototype, 'unshiftUnique', {
configurable : true,
writable : true,
value(/* variadic */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.unshiftUnique called on null or undefined');
}
const addSize = arguments.length;
if (addSize === 0) {
return this.length >>> 0;
}
const indexOf = Array.prototype.indexOf;
const unshift = Array.prototype.unshift;
for (let i = 0; i < addSize; ++i) {
const value = arguments[i];
if (indexOf.call(this, value) === -1) {
unshift.call(this, value);
}
}
return this.length >>> 0;
}
});
/*
Returns a bound function that supplies the given arguments to the base
function, followed by the arguments are supplied to the bound function,
whenever it is called.
*/
Object.defineProperty(Function.prototype, 'partial', {
configurable : true,
writable : true,
value(/* variadic */) {
if (this == null) { // lazy equality for null
throw new TypeError('Function.prototype.partial called on null or undefined');
}
const slice = Array.prototype.slice;
const fn = this;
const bound = slice.call(arguments, 0);
return function () {
const applied = [];
let argc = 0;
for (let i = 0; i < bound.length; ++i) {
applied.push(bound[i] === undefined ? arguments[argc++] : bound[i]);
}
return fn.apply(this, applied.concat(slice.call(arguments, argc)));
};
}
});
/*
Returns the given numerical clamped to the specified bounds.
*/
Object.defineProperty(Math, 'clamp', {
configurable : true,
writable : true,
value(num, min, max) {
const value = Number(num);
return Number.isNaN(value) ? NaN : value.clamp(min, max);
}
});
/*
Returns a decimal number eased from 0 to 1.
NOTE: The magnitude of the returned value decreases if num < 0.5 or increases if num > 0.5.
*/
Object.defineProperty(Math, 'easeInOut', {
configurable : true,
writable : true,
value(num) {
return 1 - (Math.cos(Number(num) * Math.PI) + 1) / 2;
}
});
/*
Returns the number clamped to the specified bounds.
*/
Object.defineProperty(Number.prototype, 'clamp', {
configurable : true,
writable : true,
value(/* min, max */) {
if (this == null) { // lazy equality for null
throw new TypeError('Number.prototype.clamp called on null or undefined');
}
if (arguments.length !== 2) {
throw new Error('Number.prototype.clamp called with an incorrect number of parameters');
}
let min = Number(arguments[0]);
let max = Number(arguments[1]);
if (min > max) {
[min, max] = [max, min];
}
return Math.min(Math.max(this, min), max);
}
});
/*
Returns a copy of the given string with all RegExp metacharacters escaped.
*/
if (!RegExp.escape) {
(() => {
const _regExpMetaCharsRe = /[\\^$*+?.()|[\]{}]/g;
const _hasRegExpMetaCharsRe = new RegExp(_regExpMetaCharsRe.source); // to drop the global flag
Object.defineProperty(RegExp, 'escape', {
configurable : true,
writable : true,
value(str) {
const val = String(str);
return val && _hasRegExpMetaCharsRe.test(val)
? val.replace(_regExpMetaCharsRe, '\\$&')
: val;
}
});
})();
}
/*
Returns a formatted string, after replacing each format item in the given
format string with the text equivalent of the corresponding argument's value.
*/
(() => {
const _formatRegExp = /{(\d+)(?:,([+-]?\d+))?}/g;
const _hasFormatRegExp = new RegExp(_formatRegExp.source); // to drop the global flag
Object.defineProperty(String, 'format', {
configurable : true,
writable : true,
value(format) {
function padString(str, align, pad) {
if (!align) {
return str;
}
const plen = Math.abs(align) - str.length;
if (plen < 1) {
return str;
}
// const padding = Array(plen + 1).join(pad);
const padding = String(pad).repeat(plen);
return align < 0 ? str + padding : padding + str;
}
if (arguments.length < 2) {
return arguments.length === 0 ? '' : format;
}
const args = arguments.length === 2 && Array.isArray(arguments[1])
? [...arguments[1]]
: Array.prototype.slice.call(arguments, 1);
if (args.length === 0) {
return format;
}
if (!_hasFormatRegExp.test(format)) {
return format;
}
// Possibly required by some old buggy browsers.
_formatRegExp.lastIndex = 0;
return format.replace(_formatRegExp, (match, index, align) => {
let retval = args[index];
if (retval == null) { // lazy equality for null
return '';
}
while (typeof retval === 'function') {
retval = retval();
}
switch (typeof retval) {
case 'string': /* no-op */ break;
case 'object': retval = JSON.stringify(retval); break;
default: retval = String(retval); break;
}
return padString(retval, !align ? 0 : Number.parseInt(align, 10), ' ');
});
}
});
})();
/*
Returns whether the given string was found within the string.
*/
Object.defineProperty(String.prototype, 'contains', {
configurable : true,
writable : true,
value(/* needle [, fromIndex] */) {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.contains called on null or undefined');
}
return String.prototype.indexOf.apply(this, arguments) !== -1;
}
});
/*
Returns the number of times the given substring was found within the string.
*/
Object.defineProperty(String.prototype, 'count', {
configurable : true,
writable : true,
value(/* needle [, fromIndex ] */) {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.count called on null or undefined');
}
const needle = String(arguments[0] || '');
if (needle === '') {
return 0;
}
const indexOf = String.prototype.indexOf;
const step = needle.length;
let pos = Number(arguments[1]) || 0;
let count = 0;
while ((pos = indexOf.call(this, needle, pos)) !== -1) {
++count;
pos += step;
}
return count;
}
});
/*
Returns the first Unicode code point from the string.
*/
Object.defineProperty(String.prototype, 'first', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.first called on null or undefined');
}
// Required as `this` could be a `String` object or come from a `call()` or `apply()`.
const str = String(this);
// Get the first code point—may be one or two code units—and its end position.
const { char } = _getCodePointStartAndEnd(str, 0);
return char;
}
});
/*
Returns the last Unicode code point from the string.
*/
Object.defineProperty(String.prototype, 'last', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.last called on null or undefined');
}
// Required as `this` could be a `String` object or come from a `call()` or `apply()`.
const str = String(this);
// Get the last code point—may be one or two code units—and its end position.
const { char } = _getCodePointStartAndEnd(str, str.length - 1);
return char;
}
});
/*
Returns a copy of the base string with `delCount` characters replaced with
`replacement`, starting at `startAt`.
*/
Object.defineProperty(String.prototype, 'splice', {
configurable : true,
writable : true,
value(startAt, delCount, replacement) {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.splice called on null or undefined');
}
const length = this.length >>> 0;
if (length === 0) {
return '';
}
let start = Number(startAt);
if (!Number.isSafeInteger(start)) {
start = 0;
}
else if (start < 0) {
start += length;
if (start < 0) {
start = 0;
}
}
if (start > length) {
start = length;
}
let count = Number(delCount);
if (!Number.isSafeInteger(count) || count < 0) {
count = 0;
}
let res = this.slice(0, start);
if (typeof replacement !== 'undefined') {
res += replacement;
}
if (start + count < length) {
res += this.slice(start + count);
}
return res;
}
});
/*
Returns an array of strings, split from the string, or an empty array if the
string is empty.
*/
Object.defineProperty(String.prototype, 'splitOrEmpty', {
configurable : true,
writable : true,
value(/* [ separator [, limit ]] */) {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.splitOrEmpty called on null or undefined');
}
// Required as `this` could be a `String` object or come from a `call()` or `apply()`.
if (String(this) === '') {
return [];
}
return String.prototype.split.apply(this, arguments);
}
});
/*
Returns a copy of the base string with the first Unicode code point uppercased,
according to any locale-specific rules.
*/
Object.defineProperty(String.prototype, 'toLocaleUpperFirst', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.toLocaleUpperFirst called on null or undefined');
}
// Required as `this` could be a `String` object or come from a `call()` or `apply()`.
const str = String(this);
// Get the first code point—may be one or two code units—and its end position.
const { char, end } = _getCodePointStartAndEnd(str, 0);
return end === -1 ? '' : char.toLocaleUpperCase() + str.slice(end + 1);
}
});
/*
Returns a copy of the base string with the first Unicode code point uppercased.
*/
Object.defineProperty(String.prototype, 'toUpperFirst', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.toUpperFirst called on null or undefined');
}
// Required as `this` could be a `String` object or come from a `call()` or `apply()`.
const str = String(this);
// Get the first code point—may be one or two code units—and its end position.
const { char, end } = _getCodePointStartAndEnd(str, 0);
return end === -1 ? '' : char.toUpperCase() + str.slice(end + 1);
}
});
/*******************************************************************************************************************
Extensions, JSON.
*******************************************************************************************************************/
/*
Define `toJSON()` methods on each prototype we wish to support.
*/
Object.defineProperty(Date.prototype, 'toJSON', {
configurable : true,
writable : true,
value() {
return ['(revive:date)', this.toISOString()];
}
});
Object.defineProperty(Function.prototype, 'toJSON', {
configurable : true,
writable : true,
value() {
/*
The enclosing parenthesis here are necessary to force the function expression code
string, returned by `this.toString()`, to be evaluated as an expression during
revival. Without them, the function expression, which is likely nameless, will be
evaluated as a function definition—which will throw a syntax error exception, since
function definitions must have a name.
*/
return ['(revive:eval)', `(${this.toString()})`];
}
});
Object.defineProperty(Map.prototype, 'toJSON', {
configurable : true,
writable : true,
value() {
return ['(revive:map)', [...this]];
}
});
Object.defineProperty(RegExp.prototype, 'toJSON', {
configurable : true,
writable : true,
value() {
return ['(revive:eval)', this.toString()];
}
});
Object.defineProperty(Set.prototype, 'toJSON', {
configurable : true,
writable : true,
value() {
return ['(revive:set)', [...this]];
}
});
/*
Utility method to allow users to easily wrap their code in the revive wrapper.
*/
Object.defineProperty(JSON, 'reviveWrapper', {
configurable : true,
writable : true,
value(code, data) {
if (typeof code !== 'string') {
throw new TypeError('JSON.reviveWrapper code parameter must be a string');
}
return ['(revive:eval)', [code, data]];
}
});
/*
Backup the original `JSON.stringify()` and replace it with a revive wrapper aware version.
*/
Object.defineProperty(JSON, '_real_stringify', {
value : JSON.stringify
});
Object.defineProperty(JSON, 'stringify', {
configurable : true,
writable : true,
value(text, replacer, space) {
return JSON._real_stringify(text, (key, val) => {
let value = val;
/*
Call the custom replacer, if specified.
*/
if (typeof replacer === 'function') {
try {
value = replacer(key, value);
}
catch (ex) { /* no-op; although, perhaps, it would be better to throw an error here */ }
}
/*
Attempt to replace values.
*/
if (typeof value === 'undefined') {
value = ['(revive:eval)', 'undefined'];
}
return value;
}, space);
}
});
/*
Backup the original `JSON.parse()` and replace it with a revive wrapper aware version.
*/
Object.defineProperty(JSON, '_real_parse', {
value : JSON.parse
});
Object.defineProperty(JSON, 'parse', {
configurable : true,
writable : true,
value(text, reviver) {
return JSON._real_parse(text, (key, val) => {
let value = val;
/*
Attempt to revive wrapped values.
*/
if (Array.isArray(value) && value.length === 2) {
switch (value[0]) {
case '(revive:set)':
value = new Set(value[1]);
break;
case '(revive:map)':
value = new Map(value[1]);
break;
case '(revive:date)':
value = new Date(value[1]);
break;
case '(revive:eval)':
try {
/* eslint-disable no-eval */
// For post-v2.9.0 `JSON.reviveWrapper()`.
if (Array.isArray(value[1])) {
const $ReviveData$ = value[1][1]; // eslint-disable-line no-unused-vars
value = eval(value[1][0]);
}
// For regular expressions, functions, and pre-v2.9.0 `JSON.reviveWrapper()`.
else {
value = eval(value[1]);
}
/* eslint-enable no-eval */
}
catch (ex) { /* no-op; although, perhaps, it would be better to throw an error here */ }
break;
}
}
/* legacy */
else if (typeof value === 'string' && value.slice(0, 10) === '@@revive@@') {
try {
value = eval(value.slice(10)); // eslint-disable-line no-eval
}
catch (ex) { /* no-op; although, perhaps, it would be better to throw an error here */ }
}
/* /legacy */
/*
Call the custom reviver, if specified.
*/
if (typeof reviver === 'function') {
try {
value = reviver(key, value);
}
catch (ex) { /* no-op; although, perhaps, it would be better to throw an error here */ }
}
return value;
});
}
});
/*******************************************************************************************************************
Extensions, Deprecated.
*******************************************************************************************************************/
/*
[DEPRECATED] Returns whether the given element was found within the array.
*/
Object.defineProperty(Array.prototype, 'contains', {
configurable : true,
writable : true,
value(/* needle [, fromIndex] */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.contains called on null or undefined');
}
return Array.prototype.includes.apply(this, arguments);
}
});
/*
[DEPRECATED] Returns whether all of the given elements were found within the array.
*/
Object.defineProperty(Array.prototype, 'containsAll', {
configurable : true,
writable : true,
value(/* needle [, fromIndex] */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.containsAll called on null or undefined');
}
return Array.prototype.includesAll.apply(this, arguments);
}
});
/*
[DEPRECATED] Returns whether any of the given elements were found within the array.
*/
Object.defineProperty(Array.prototype, 'containsAny', {
configurable : true,
writable : true,
value(/* needle [, fromIndex] */) {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.containsAny called on null or undefined');
}
return Array.prototype.includesAny.apply(this, arguments);
}
});
/*
[DEPRECATED] Returns a new array consisting of the flattened source array.
*/
Object.defineProperty(Array.prototype, 'flatten', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('Array.prototype.flatten called on null or undefined');
}
return Array.prototype.flat.call(this, Infinity);
}
});
/*
[DEPRECATED] Returns an array of link titles, parsed from the string.
NOTE: Unused in SugarCube, only included for compatibility.
*/
Object.defineProperty(String.prototype, 'readBracketedList', {
configurable : true,
writable : true,
value() {
if (this == null) { // lazy equality for null
throw new TypeError('String.prototype.readBracketedList called on null or undefined');
}
// RegExp groups: Double-square-bracket quoted | Unquoted.
const re = new RegExp('(?:\\[\\[((?:\\s|\\S)*?)\\]\\])|([^"\'\\s]\\S*)', 'gm');
const names = [];
let match;
while ((match = re.exec(this)) !== null) {
if (match[1]) { // double-square-bracket quoted
names.push(match[1]);
}
else if (match[2]) { // unquoted
names.push(match[2]);
}
}
return names;
}
});
})();
| 24.663136 | 120 | 0.593098 |
83c12eb89839bbf8b5dca24aea0d5b79474f3862 | 24,084 | js | JavaScript | packages/strapi-admin/tests/admin-role.test.e2e.js | fiik346/strapi | 4007d426e9528b18bb24929323d6170385556d05 | [
"MIT"
] | 1 | 2021-04-12T15:50:59.000Z | 2021-04-12T15:50:59.000Z | packages/strapi-admin/tests/admin-role.test.e2e.js | fiik346/strapi | 4007d426e9528b18bb24929323d6170385556d05 | [
"MIT"
] | 161 | 2020-09-17T06:23:21.000Z | 2022-03-31T01:46:21.000Z | packages/strapi-admin/tests/admin-role.test.e2e.js | fiik346/strapi | 4007d426e9528b18bb24929323d6170385556d05 | [
"MIT"
] | 1 | 2021-02-11T12:54:02.000Z | 2021-02-11T12:54:02.000Z | 'use strict';
const _ = require('lodash');
const { createStrapiInstance } = require('../../../test/helpers/strapi');
const { createAuthRequest } = require('../../../test/helpers/request');
const edition = process.env.STRAPI_DISABLE_EE === 'true' ? 'CE' : 'EE';
const sortPermissionArray = arr => _.sortBy(arr, ['action', 'subject']);
const data = {
rolesWithUsers: [],
rolesWithoutUsers: [],
users: [],
deleteRolesIds: [],
superAdminRole: undefined,
authorRole: undefined,
editorRole: undefined,
};
const omitTimestamps = obj => _.omit(obj, ['updatedAt', 'createdAt', 'updated_at', 'created_at']);
describe('Role CRUD End to End', () => {
let rq;
let strapi;
beforeAll(async () => {
strapi = await createStrapiInstance();
rq = await createAuthRequest({ strapi });
}, 60000);
afterAll(async () => {
await strapi.destroy();
});
describe('Default roles', () => {
test('Default roles are created', async () => {
const defaultsRoles = [
{
name: 'Super Admin',
code: 'strapi-super-admin',
description: 'Super Admins can access and manage all features and settings.',
usersCount: 1,
},
{
name: 'Editor',
code: 'strapi-editor',
description: 'Editors can manage and publish contents including those of other users.',
usersCount: 0,
},
{
name: 'Author',
code: 'strapi-author',
description: 'Authors can manage the content they have created.',
usersCount: 0,
},
];
const res = await rq({
url: '/admin/roles',
method: 'GET',
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toHaveLength(3);
expect(res.body.data).toEqual(
expect.arrayContaining([
expect.objectContaining(defaultsRoles[0]),
expect.objectContaining(defaultsRoles[1]),
expect.objectContaining(defaultsRoles[2]),
])
);
data.superAdminRole = res.body.data.find(r => r.code === 'strapi-super-admin');
data.authorRole = res.body.data.find(r => r.code === 'strapi-author');
data.editorRole = res.body.data.find(r => r.code === 'strapi-editor');
});
test('Author have admin::is-creator condition for every permission', async () => {
const res = await rq({
url: `/admin/roles/${data.authorRole.id}/permissions`,
method: 'GET',
});
expect(res.statusCode).toBe(200);
expect(Array.isArray(res.body.data)).toBe(true);
expect(res.body.data).toHaveLength(5);
res.body.data
.filter(p => !p.action.includes('plugins::upload'))
.forEach(permission => {
expect(permission.conditions).toEqual(['admin::is-creator']);
});
});
test("Editor's permissions don't have any conditions", async () => {
const res = await rq({
url: `/admin/roles/${data.editorRole.id}/permissions`,
method: 'GET',
});
expect(res.statusCode).toBe(200);
expect(Array.isArray(res.body.data)).toBe(true);
expect(res.body.data).toHaveLength(5);
res.body.data
.filter(p => !p.action.includes('plugins::upload'))
.forEach(permission => {
expect(permission.conditions).toEqual([]);
});
});
if (edition === 'EE') {
const newPermissions = [
{
action: 'plugins::users-permissions.roles.update',
},
{
action: 'plugins::content-manager.explorer.create',
subject: 'plugins::users-permissions.user',
fields: ['username'],
conditions: ['admin::is-creator'],
},
];
test('Conditions of editors and author can be modified', async () => {
let res = await rq({
url: `/admin/roles/${data.editorRole.id}/permissions`,
method: 'PUT',
body: { permissions: newPermissions },
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toHaveLength(2);
expect(res.body).toEqual({
data: expect.arrayContaining([
expect.objectContaining({
action: 'plugins::users-permissions.roles.update',
conditions: [],
}),
expect.objectContaining({
action: 'plugins::content-manager.explorer.create',
subject: 'plugins::users-permissions.user',
fields: ['username'],
conditions: ['admin::is-creator'],
}),
]),
});
res = await rq({
url: `/admin/roles/${data.authorRole.id}/permissions`,
method: 'PUT',
body: { permissions: newPermissions },
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toHaveLength(2);
expect(res.body).toEqual({
data: expect.arrayContaining([
expect.objectContaining({
action: 'plugins::users-permissions.roles.update',
conditions: [],
}),
expect.objectContaining({
action: 'plugins::content-manager.explorer.create',
subject: 'plugins::users-permissions.user',
fields: ['username'],
conditions: ['admin::is-creator'],
}),
]),
});
});
} else if (edition === 'CE') {
const newPermissions = [
{
action: 'plugins::users-permissions.roles.update',
},
{
action: 'plugins::users-permissions.roles.read',
conditions: ['admin::is-creator'],
},
{
action: 'plugins::content-manager.explorer.create',
subject: 'plugins::users-permissions.user',
fields: ['username'],
conditions: ['admin::is-creator'],
},
{
action: 'plugins::content-manager.explorer.update',
subject: 'plugins::users-permissions.user',
fields: ['username'],
conditions: ['admin::is-creator'],
},
{
action: 'plugins::content-manager.explorer.delete',
subject: 'plugins::users-permissions.user',
fields: null,
conditions: ['admin::is-creator'],
},
{
action: 'plugins::content-manager.explorer.read',
subject: 'plugins::users-permissions.user',
fields: ['username'],
conditions: ['admin::is-creator'],
},
];
test("Conditions of editors and author can't be modified", async () => {
let res = await rq({
url: `/admin/roles/${data.editorRole.id}/permissions`,
method: 'PUT',
body: { permissions: newPermissions },
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toHaveLength(6);
expect(res.body).toEqual({
data: expect.arrayContaining(
newPermissions
.slice(3, 6)
.map(p => ({ ...p, conditions: [] }))
.map(expect.objectContaining)
),
});
res = await rq({
url: `/admin/roles/${data.authorRole.id}/permissions`,
method: 'PUT',
body: { permissions: newPermissions },
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toHaveLength(6);
expect(res.body).toEqual({
data: expect.arrayContaining(
newPermissions
.slice(3, 6)
.map(p => ({ ...p, conditions: ['admin::is-creator'] }))
.map(expect.objectContaining)
),
});
});
}
});
if (edition === 'EE') {
describe('Create some roles', () => {
const rolesToCreate = [
[{ name: 'new role 0', description: 'description' }],
[{ name: 'new role 1', description: 'description' }],
[{ name: 'new role 2', description: 'description' }],
[{ name: 'new role 3', description: 'description' }],
[{ name: 'new role 4', description: 'description' }],
[{ name: 'new role 5', description: 'description' }],
];
test.each(rolesToCreate)('can create %p', async role => {
let res = await rq({
url: '/admin/roles',
method: 'POST',
body: role,
});
expect(res.statusCode).toBe(201);
expect(res.body.data).toMatchObject({
id: expect.anything(),
name: role.name,
description: role.description,
});
data.rolesWithoutUsers.push(res.body.data);
});
test('Cannot create a role already existing', async () => {
const role = _.pick(data.rolesWithoutUsers[0], ['name', 'description']);
const res = await rq({
url: '/admin/roles',
method: 'POST',
body: role,
});
expect(res.statusCode).toBe(400);
expect(res.body.data).toMatchObject({
name: [`The name must be unique and a role with name \`${role.name}\` already exists.`],
});
});
test('Can create a user with a role', async () => {
const user = {
email: 'new-user@strapi.io',
firstname: 'New',
lastname: 'User',
roles: [data.rolesWithoutUsers[5].id],
};
const res = await rq({
url: '/admin/users',
method: 'POST',
body: user,
});
expect(res.statusCode).toBe(201);
data.users.push(res.body.data);
data.rolesWithUsers.push(data.rolesWithoutUsers[5]);
data.rolesWithoutUsers.splice(5, 1);
});
});
describe('Find a role', () => {
test('Can find a role successfully', async () => {
const res = await rq({
url: `/admin/roles/${data.rolesWithoutUsers[0].id}`,
method: 'GET',
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toMatchObject({
id: data.rolesWithoutUsers[0].id,
name: data.rolesWithoutUsers[0].name,
description: data.rolesWithoutUsers[0].description,
usersCount: 0,
code: expect.anything(),
});
expect(res.body.data.code.startsWith('new-role-0')).toBe(true);
});
});
describe('Find all roles', () => {
test('Can find all roles successfully', async () => {
const expectedRolesWithoutUser = data.rolesWithoutUsers.map(r => ({ ...r, usersCount: 0 }));
const expectedRolesWithUser = data.rolesWithUsers.map(r => ({ ...r, usersCount: 1 }));
const expectedRoles = expectedRolesWithoutUser.concat(expectedRolesWithUser);
const res = await rq({
url: '/admin/roles',
method: 'GET',
});
expect(res.statusCode).toBe(200);
expectedRoles.forEach(role => {
expect(res.body.data).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: role.id,
name: role.name,
description: role.description,
usersCount: role.usersCount,
code: expect.anything(),
}),
])
);
});
});
});
describe('Update a role', () => {
test('Can update name and description of a role successfully', async () => {
const updates = {
name: 'new name - Cannot update the name of a role',
description: 'new description - Can update a role successfully',
};
const res = await rq({
url: `/admin/roles/${data.rolesWithoutUsers[0].id}`,
method: 'PUT',
body: updates,
});
expect(res.statusCode).toBe(200);
expect(omitTimestamps(res.body.data)).toMatchObject({
...omitTimestamps(data.rolesWithoutUsers[0]),
...updates,
});
data.rolesWithoutUsers[0] = res.body.data;
});
test('Can update description of a role successfully', async () => {
const updates = {
name: 'new name - Cannot update the name of a role',
description: 'new description - Can update description of a role successfully',
};
const res = await rq({
url: `/admin/roles/${data.rolesWithoutUsers[0].id}`,
method: 'PUT',
body: updates,
});
expect(res.statusCode).toBe(200);
expect(omitTimestamps(res.body.data)).toMatchObject({
...omitTimestamps(data.rolesWithoutUsers[0]),
...updates,
});
data.rolesWithoutUsers[0] = res.body.data;
});
test('Cannot update the name of a role if already exists', async () => {
const updates = {
name: data.rolesWithoutUsers[0].name,
description: 'new description - Cannot update the name of a role if already exists',
};
const res = await rq({
url: `/admin/roles/${data.rolesWithoutUsers[1].id}`,
method: 'PUT',
body: updates,
});
expect(res.statusCode).toBe(400);
expect(res.body.data).toMatchObject({
name: [
`The name must be unique and a role with name \`${data.rolesWithoutUsers[0].name}\` already exists.`,
],
});
});
test('Cannot update super admin role', async () => {
const updates = {
name: 'new name - Cannot update the name of a role',
description: 'new description - Can update a role successfully',
};
const res = await rq({
url: `/admin/roles/${data.superAdminRole.id}`,
method: 'PUT',
body: updates,
});
expect(res.statusCode).toBe(400);
});
});
describe('Delete roles', () => {
describe('batch-delete', () => {
test("Don't delete the roles if some still have assigned users", async () => {
const roles = [data.rolesWithUsers[0], data.rolesWithUsers[0]];
const rolesIds = roles.map(r => r.id);
let res = await rq({
url: '/admin/roles/batch-delete',
method: 'POST',
body: { ids: rolesIds },
});
expect(res.statusCode).toBe(400);
expect(res.body.data).toMatchObject({
ids: ['Some roles are still assigned to some users'],
});
for (let role of roles) {
res = await rq({
url: `/admin/roles/${role.id}`,
method: 'GET',
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toMatchObject(role);
}
});
test('Can delete a role', async () => {
let res = await rq({
url: '/admin/roles/batch-delete',
method: 'POST',
body: { ids: [data.rolesWithoutUsers[0].id] },
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toMatchObject([data.rolesWithoutUsers[0]]);
res = await rq({
url: `/admin/roles/${data.rolesWithoutUsers[0].id}`,
method: 'GET',
});
expect(res.statusCode).toBe(404);
data.deleteRolesIds.push(data.rolesWithoutUsers[0].id);
data.rolesWithoutUsers.shift();
});
test('Can delete two roles', async () => {
const roles = data.rolesWithoutUsers.slice(0, 2);
const rolesIds = roles.map(r => r.id);
let res = await rq({
url: '/admin/roles/batch-delete',
method: 'POST',
body: { ids: rolesIds },
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toMatchObject(roles);
for (let roleId of rolesIds) {
res = await rq({
url: `/admin/roles/${roleId}`,
method: 'GET',
});
expect(res.statusCode).toBe(404);
data.deleteRolesIds.push(data.rolesWithoutUsers[0].id);
data.rolesWithoutUsers.shift();
}
});
});
describe('simple delete', () => {
test('Can delete a role', async () => {
let res = await rq({
url: `/admin/roles/${data.rolesWithoutUsers[0].id}`,
method: 'DELETE',
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toMatchObject(data.rolesWithoutUsers[0]);
res = await rq({
url: `/admin/roles/${data.rolesWithoutUsers[0].id}`,
method: 'GET',
});
expect(res.statusCode).toBe(404);
data.deleteRolesIds.push(data.rolesWithoutUsers[0].id);
data.rolesWithoutUsers.shift();
});
test("Don't delete a role if it still has assigned users", async () => {
let res = await rq({
url: `/admin/roles/${data.rolesWithUsers[0].id}`,
method: 'DELETE',
});
expect(res.statusCode).toBe(400);
expect(res.body.data).toMatchObject({
id: ['Some roles are still assigned to some users'],
});
res = await rq({
url: `/admin/roles/${data.rolesWithUsers[0].id}`,
method: 'GET',
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toMatchObject(data.rolesWithUsers[0]);
});
test("Can't delete super admin role", async () => {
let res = await rq({
url: `/admin/roles/${data.superAdminRole.id}`,
method: 'DELETE',
});
expect(res.statusCode).toBe(400);
expect(res.body.data).toMatchObject({
id: ['You cannot delete the super admin role'],
});
res = await rq({
url: `/admin/roles/${data.rolesWithUsers[0].id}`,
method: 'GET',
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toMatchObject(data.rolesWithUsers[0]);
});
});
});
describe("Roles don't exist", () => {
test("Cannot update a role if it doesn't exist", async () => {
const updates = {
name: "new name - Cannot update a role if it doesn't exist",
description: "new description - Cannot update a role if it doesn't exist",
};
const res = await rq({
url: `/admin/roles/${data.deleteRolesIds[0]}`,
method: 'PUT',
body: updates,
});
expect(res.statusCode).toBe(404);
expect(res.body).toMatchObject({
statusCode: 404,
error: 'Not Found',
message: 'role.notFound',
});
});
test("Simple delete - No error if deleting a role that doesn't exist", async () => {
const res = await rq({
url: `/admin/roles/${data.deleteRolesIds[0]}`,
method: 'DELETE',
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toEqual(null);
});
test("Batch Delete - No error if deleting a role that doesn't exist", async () => {
const res = await rq({
url: '/admin/roles/batch-delete',
method: 'POST',
body: { ids: [data.deleteRolesIds[0]] },
});
expect(res.statusCode).toBe(200);
expect(res.body.data).toEqual([]);
});
});
describe('get & update Permissions', () => {
test('get permissions on empty role', async () => {
const res = await rq({
url: `/admin/roles/${data.rolesWithoutUsers[0].id}/permissions`,
method: 'GET',
});
expect(res.statusCode).toBe(200);
expect(res.body).toEqual({
data: [],
});
});
test('assign permissions on role', async () => {
const res = await rq({
url: `/admin/roles/${data.rolesWithoutUsers[0].id}/permissions`,
method: 'PUT',
body: {
permissions: [
{
action: 'plugins::users-permissions.roles.update',
},
{
action: 'plugins::content-manager.explorer.create',
subject: 'plugins::users-permissions.user',
fields: ['username'],
conditions: ['admin::is-creator'],
},
],
},
});
expect(res.statusCode).toBe(200);
expect(res.body.data.length > 0).toBe(true);
res.body.data.forEach(permission => {
expect(permission).toMatchObject({
id: expect.anything(),
action: expect.any(String),
subject: expect.stringOrNull(),
});
if (permission.conditions.length > 0) {
expect(permission.conditions).toEqual(expect.arrayContaining([expect.any(String)]));
}
if (permission.fields && permission.fields.length > 0) {
expect(permission.fields).toEqual(expect.arrayContaining([expect.any(String)]));
}
});
});
test('assign permissions on role with an unknown condition', async () => {
const permissions = [
{
action: 'plugins::users-permissions.roles.update',
},
{
action: 'plugins::content-manager.explorer.create',
subject: 'plugins::users-permissions.user',
fields: ['username'],
conditions: ['admin::is-creator'],
},
];
const res = await rq({
url: `/admin/roles/${data.rolesWithoutUsers[0].id}/permissions`,
method: 'PUT',
body: {
permissions: [
permissions[0],
{
...permissions[1],
conditions: [...permissions[1].conditions, 'unknown-condition'],
},
],
},
});
expect(res.statusCode).toBe(200);
expect(res.body.data.length > 0).toBe(true);
expect(sortPermissionArray(res.body.data)).toMatchObject(
sortPermissionArray(
permissions.map(perm => ({ subject: null, fields: null, conditions: [], ...perm }))
)
);
});
test("can't assign non-existing permissions on role", async () => {
const res = await rq({
url: `/admin/roles/${data.rolesWithoutUsers[0].id}/permissions`,
method: 'PUT',
body: {
permissions: [
{
action: 'non.existing.action',
},
],
},
});
expect(res.statusCode).toBe(400);
expect(res.body).toMatchObject({
statusCode: 400,
error: 'Bad Request',
message: 'ValidationError',
data: { permissions: ['[0] is not an existing permission action'] },
});
});
test('get permissions role', async () => {
const res = await rq({
url: `/admin/roles/${data.rolesWithoutUsers[0].id}/permissions`,
method: 'GET',
});
expect(res.statusCode).toBe(200);
expect(res.body.data.length > 0).toBe(true);
res.body.data.forEach(permission => {
expect(permission).toMatchObject({
id: expect.anything(),
action: expect.any(String),
subject: expect.stringOrNull(),
});
if (permission.conditions.length > 0) {
expect(permission.conditions).toEqual(expect.arrayContaining([expect.any(String)]));
}
if (permission.fields && permission.fields.length > 0) {
expect(permission.fields).toEqual(expect.arrayContaining([expect.any(String)]));
}
});
});
});
}
if (edition === 'CE') {
describe('Cannot create a new role', () => {
test('Cannot create a role successfully', async () => {
const role = {
name: 'new role',
description: 'Description of new role',
};
const res = await rq({
url: '/admin/roles',
method: 'POST',
body: role,
});
expect(res.statusCode).toBe(405);
});
});
}
});
| 32.370968 | 113 | 0.52101 |
83c17d189793fd1bec20698a470c3de382fd01bc | 2,053 | js | JavaScript | src/util.js | dan-Zd/car-vueapp | f4647f7ce2a4c9d912b191b91d3f9a098b50b0ee | [
"MIT"
] | 48 | 2018-04-19T09:07:12.000Z | 2021-11-09T10:44:32.000Z | src/util.js | mrlinjw/car-vueapp | f4647f7ce2a4c9d912b191b91d3f9a098b50b0ee | [
"MIT"
] | 1 | 2018-10-11T07:55:39.000Z | 2018-10-11T07:55:39.000Z | src/util.js | mrlinjw/car-vueapp | f4647f7ce2a4c9d912b191b91d3f9a098b50b0ee | [
"MIT"
] | 28 | 2018-05-16T02:03:12.000Z | 2022-01-10T01:25:26.000Z | /**
* Created by jason on 2017/9/4.
*/
// 格式化金钱
function formatMoney(number, places, symbol, thousand, decimal, isCent) {
isCent = isCent || true
if (isCent) {
number = number / 100 || 0
} else {
number = number || 0
}
places = !isNaN(places = Math.abs(places)) ? places : 2
symbol = symbol !== undefined ? symbol : ''
thousand = thousand || ','
decimal = decimal || '.'
var negative = number < 0 ? '-' : '',
i = parseInt(number = Math.abs(+number || 0).toFixed(places), 10) + '',
j = (j = i.length) > 3 ? j % 3 : 0
return symbol + negative + (j ? i.substr(0, j) + thousand : '') + i.substr(j).replace(/(\d{3})(?=\d)/g, '$1' + thousand) + (places ? decimal + Math.abs(number - i).toFixed(places).slice(2) : '')
}
//计算停车单开始时间与结束时间的时长
function calParkingDuration(begin, end) {
function formatSeconds(value) {
var t = parseInt(value)// 秒
var t1 = 0// 分
var t2 = 0// 小时
if (t > 60) {
t1 = parseInt(t / 60)
t = parseInt(t % 60)
if (t1 > 60) {
t2 = parseInt(t1 / 60)
t1 = parseInt(t1 % 60)
}
}
var result = '' + parseInt(t) + '秒'
if (t1 > 0) {
result = '' + parseInt(t1) + '分钟' + result
}
if (t2 > 0) {
result = '' + parseInt(t2) + '小时' + result
}
return result
}
if (begin && end) {
let duration = end - begin
return formatSeconds(duration / 1000)
}
return '无'
}
//格式化时间(传入时间戳,毫秒级)
function formatTime(val) {
if (!val) {
return ''
}
function f(v) {
return v < 10 ? '0' + v : v
}
let time = new Date(val)
let y = time.getFullYear()
let m = time.getMonth() + 1
let d = time.getDate()
let h = time.getHours()
let mm = time.getMinutes()
let s = time.getSeconds()
return y + '-' + f(m) + '-' + f(d) + ' ' + f(h) + ':' + f(mm) + ':' + f(s)
}
export {formatMoney,calParkingDuration,formatTime}
| 28.123288 | 198 | 0.48904 |
83c1a5efa1c57ba7808d224ae24e474455da84d3 | 689 | js | JavaScript | node_modules/skipper/standalone/Upstream/prototype.pipe.js | rodgues/angular4-sails | a59b9c43211fb87aa0e68258b410ea9bbc19c50b | [
"MIT"
] | 404 | 2015-01-05T02:09:56.000Z | 2020-07-07T07:49:25.000Z | node_modules/skipper/standalone/Upstream/prototype.pipe.js | rodgues/angular4-sails | a59b9c43211fb87aa0e68258b410ea9bbc19c50b | [
"MIT"
] | 157 | 2015-01-02T04:15:51.000Z | 2020-07-17T08:30:32.000Z | node_modules/skipper/standalone/Upstream/prototype.pipe.js | rodgues/angular4-sails | a59b9c43211fb87aa0e68258b410ea9bbc19c50b | [
"MIT"
] | 84 | 2015-01-05T02:09:58.000Z | 2020-04-30T07:57:14.000Z | /**
* Module dependencies
*/
var Readable = require('stream').Readable;
/**
* Override pipe so we know when this starts getting consumed.
*
* Here, we set a flag indicating that we're being read out of
* by at least one connected receiver.
*
* @this {Upstream}
* @return {Upstream} this
* @chainable
*/
module.exports = function pipe ( /* destination, [options] */) {
var self = this;
self._connected = true;
self._receiver = arguments[0];
self.once('end', function (){
self._emittedEnd = true;
});
self.once('error', function (){
self._emittedError = true;
});
return Readable.prototype.pipe.apply(self, Array.prototype.slice.call(arguments));
};
| 20.878788 | 84 | 0.661829 |
83c1ca4c7acbb034d585e041f41ffc6929b15272 | 2,476 | js | JavaScript | src/parser/tools/js_test_files.js | tako-black/nagare | 8b5cb8eed2b208197abcf582b591537def887ba3 | [
"BSD-3-Clause"
] | 2 | 2015-07-28T23:53:32.000Z | 2015-07-31T15:17:21.000Z | src/parser/tools/js_test_files.js | mcanthony/flow-type | fb50e311cbc4d6b716889419796ff8a8746bd7f1 | [
"BSD-3-Clause"
] | 3 | 2020-12-31T09:08:34.000Z | 2021-09-28T05:42:02.000Z | third_party/flow/src/parser/tools/js_test_files.js | moul/kythe | 2e198cc818981fc6cffa14d8263fda3a33da6429 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env node
var flow = require("../flow_parser.js");
var colors = require("colors");
var util = require("util");
var fs = require("fs");
var parseArgs = require("minimist");
var ast_types = require("ast-types");
var argv = parseArgs(
process.argv.slice(2),
{
alias: {verbose: "v"},
boolean: [ "verbose", "v", "firstError" ]
}
);
var pass_count = 0;
var fail_count = 0;
function error(e, data) {
return {
passed: false,
error: e,
data: data
};
}
function success(e) {
return {
passed: true
}
}
function parse_file(filename, data) {
var result;
var ast = flow.parse(data);
try {
process.stdout.write(filename + " : ... ");
var ast = flow.parse(data);
if (ast.errors.length > 0) {
result = error("Parse errors!", ast.errors);
return;
}
if (!ast_types.namedTypes.Program.check(ast, true)) {
result = error("Bad AST");
return;
}
result = success();
} catch (e) {
var data = {
message: e.toString(),
stack: e.stack
}
result = error("Flow exploded", data);
} finally {
if (result.passed) {
pass_count++;
console.log("\rPASSED".green, filename);
} else {
fail_count++;
if (argv.verbose) {
var data = util.inspect(result.data, {depth: null});
console.log("\rFAILED".red, filename);
console.log("\t", result.error, "\n\t", data);
} else {
console.log("\rFAILED".red, filename, result.error);
if (argv.firstError && result.data && result.data.length > 0) {
console.log("\t", result.data[0]);
}
}
}
if (pass_count + fail_count == argv._.length) {
console.log("%d/%d passed", pass_count, pass_count + fail_count);
}
}
}
if (argv.help || argv._.length == 0) {
console.log("Tests 1 or more files to see if they parse successfully and if "+
"the produced ASTs are valid according to ast-types");
console.log("Usage: ./js_test_files [file1] [file2] ... [filen]");
console.log("\nOptions:");
var options = {
"--verbose": "For each failure, print all relevant information",
"--firstError": "For each failure, print only the first error"
}
for (prop in options) {
if (options.hasOwnProperty(prop)) {
console.log("\t%s\t%s", prop, options[prop]);
}
}
}
for (var i = 0; i < argv._.length; i++) {
var data = fs.readFileSync(argv._[i] + "").toString();
parse_file(argv._[i], data);
}
| 25.525773 | 80 | 0.581179 |
83c202cf4dc2f5a7ae2852a78805e5902090d398 | 777 | js | JavaScript | src/step-3/common/HelloMessage.js | DJCordhose/react-intro-live-coding | aedb213d1a0dd7997e3625cdc22134f6cc68ff99 | [
"MIT"
] | null | null | null | src/step-3/common/HelloMessage.js | DJCordhose/react-intro-live-coding | aedb213d1a0dd7997e3625cdc22134f6cc68ff99 | [
"MIT"
] | null | null | null | src/step-3/common/HelloMessage.js | DJCordhose/react-intro-live-coding | aedb213d1a0dd7997e3625cdc22134f6cc68ff99 | [
"MIT"
] | null | null | null | import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as Actions from './actions';
class HelloMessage extends React.Component {
render() {
const { greeting, updateGreeting, resetGreeting } = this.props;
return <div>
<input onChange={event => updateGreeting(event.target.value)}
value={greeting}/>
<p>{greeting}, World</p>
<button
onClick={() => resetGreeting()}>
Clear
</button>
</div>;
}
}
function mapStateToProps(state) {
return {
greeting: state.greeting
};
}
function mapDispatchToProps(dispatch) {
return bindActionCreators(Actions, dispatch);
}
export default connect(mapStateToProps, mapDispatchToProps)(HelloMessage);
| 22.852941 | 74 | 0.66538 |
83c2ea76dca20eed2b1fba3d60cd4d202913814e | 891 | js | JavaScript | Project/resources/scripts/objects/skybox.js | mgrzeszczak/racing-3d | 44f2ba1abab9c62ee65420474a57e98d8cbf816d | [
"MIT"
] | 2 | 2019-07-05T09:54:43.000Z | 2020-11-09T17:58:15.000Z | Project/resources/scripts/objects/skybox.js | mgrzeszczak/racing-3d | 44f2ba1abab9c62ee65420474a57e98d8cbf816d | [
"MIT"
] | null | null | null | Project/resources/scripts/objects/skybox.js | mgrzeszczak/racing-3d | 44f2ba1abab9c62ee65420474a57e98d8cbf816d | [
"MIT"
] | 4 | 2017-03-29T17:50:46.000Z | 2021-05-20T06:40:02.000Z | app.objects.skybox = function(model,target){
this.model = model;
this.worldMatrix = mat4.create();
this.workMatrix = mat4.create();
this.shader = app.shaderLoader.getStaticShader();
this.render = function(gl){
var shader = this.shader;
var worldMatrixUniformLocation = gl.getUniformLocation(shader,app.names.SHADER_WORLD_MATRIX);
mat4.identity(this.worldMatrix);
mat4.fromScaling(this.worldMatrix,[50,50,50]);
//mat4.fromTranslation(this.workMatrix,target.getPosition());
var translation = vec3.clone(app.getCamera().position);
translation[1] = 0;
mat4.fromTranslation(this.workMatrix,translation);
mat4.multiply(this.worldMatrix,this.workMatrix,this.worldMatrix);
gl.uniformMatrix4fv(worldMatrixUniformLocation,false,this.worldMatrix);
this.model.render(gl,shader);
};
}; | 34.269231 | 101 | 0.690236 |
83c314d63bfd2dd581749bc618de844a956bb5d7 | 61,638 | js | JavaScript | public/2.js | SoftwareEngineer01/laravel-vuejs | 19fa6930b1668f369d344722458a2fe1d64e073e | [
"MIT"
] | null | null | null | public/2.js | SoftwareEngineer01/laravel-vuejs | 19fa6930b1668f369d344722458a2fe1d64e073e | [
"MIT"
] | null | null | null | public/2.js | SoftwareEngineer01/laravel-vuejs | 19fa6930b1668f369d344722458a2fe1d64e073e | [
"MIT"
] | null | null | null | (window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/ErrorValidation/ErrorValidation.vue?vue&type=script&lang=js&":
/*!******************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/ErrorValidation/ErrorValidation.vue?vue&type=script&lang=js& ***!
\******************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
//
//
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
name: 'ErrorValidation',
props: ['errors'],
data: function data() {
return {};
},
computed: {
validationErrors: function validationErrors() {
var errors = Object.values(this.errors);
errors = errors.flat();
return errors;
}
}
});
/***/ }),
/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=script&lang=js&":
/*!*******************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=script&lang=js& ***!
\*******************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _services_inventaryType_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../services/inventaryType_service */ "./resources/js/services/inventaryType_service.js");
/* harmony import */ var _services_inventary_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../services/inventary_service */ "./resources/js/services/inventary_service.js");
/* harmony import */ var _services_inventory_entry_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../services/inventory_entry_service */ "./resources/js/services/inventory_entry_service.js");
/* harmony import */ var vuelidate_lib_validators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vuelidate/lib/validators */ "./node_modules/vuelidate/lib/validators/index.js");
/* harmony import */ var vuelidate_lib_validators__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vuelidate_lib_validators__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _ErrorValidation_ErrorValidation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ErrorValidation/ErrorValidation */ "./resources/js/components/ErrorValidation/ErrorValidation.vue");
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
// Service
//Validación formulario
//Componentes
/* harmony default export */ __webpack_exports__["default"] = ({
name: 'AddInventoryEntry',
data: function data() {
return {
validationErrors: '',
final_units: '',
units: '',
message: 'Dato requerido',
inventaryTypes: [],
inventories: [],
inventoryEntryData: {
inventory_type_id: '',
bill: '',
inventory_id: '',
entries: '',
cost: 0
}
};
},
components: {
ErrorValidation: _ErrorValidation_ErrorValidation__WEBPACK_IMPORTED_MODULE_5__["default"]
},
computed: {
entriesErrors: function entriesErrors() {
var errors = [];
if (!this.$v.inventoryEntryData.entries.$dirty) return errors;
!this.$v.inventoryEntryData.entries.required && errors.push(this.message);
!this.$v.inventoryEntryData.entries.numeric && errors.push('Solo números');
return errors;
}
},
validations: {
inventoryEntryData: {
inventory_type_id: {
required: vuelidate_lib_validators__WEBPACK_IMPORTED_MODULE_4__["required"]
},
bill: {
required: vuelidate_lib_validators__WEBPACK_IMPORTED_MODULE_4__["required"]
},
inventory_id: {
required: vuelidate_lib_validators__WEBPACK_IMPORTED_MODULE_4__["required"]
},
entries: {
required: vuelidate_lib_validators__WEBPACK_IMPORTED_MODULE_4__["required"],
numeric: vuelidate_lib_validators__WEBPACK_IMPORTED_MODULE_4__["numeric"]
},
cost: {
required: vuelidate_lib_validators__WEBPACK_IMPORTED_MODULE_4__["required"]
}
}
},
mounted: function mounted() {
this.getInventoryTypes();
},
methods: {
validationStatus: function validationStatus(validation) {
return typeof validation != "undefined" ? validation.$error : false;
},
getInventoryTypes: function () {
var _getInventoryTypes = _asyncToGenerator( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() {
var response;
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.prev = 0;
_context.next = 3;
return _services_inventaryType_service__WEBPACK_IMPORTED_MODULE_1__["getInventaryTypes"]();
case 3:
response = _context.sent;
this.inventaryTypes = response.data.data;
_context.next = 10;
break;
case 7:
_context.prev = 7;
_context.t0 = _context["catch"](0);
console.log(_context.t0.response);
case 10:
case "end":
return _context.stop();
}
}
}, _callee, this, [[0, 7]]);
}));
function getInventoryTypes() {
return _getInventoryTypes.apply(this, arguments);
}
return getInventoryTypes;
}(),
getInventoriesByType: function () {
var _getInventoriesByType = _asyncToGenerator( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2(id) {
var response;
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
this.clearData();
_context2.prev = 1;
_context2.next = 4;
return _services_inventary_service__WEBPACK_IMPORTED_MODULE_2__["getInventoriesByType"](id);
case 4:
response = _context2.sent;
if (response.status == 200) {
this.inventories = response.data.data;
}
_context2.next = 11;
break;
case 8:
_context2.prev = 8;
_context2.t0 = _context2["catch"](1);
if (_context2.t0.response.status == 422) {
this.validationErrors = _context2.t0.response.data.errorMessages;
}
case 11:
case "end":
return _context2.stop();
}
}
}, _callee2, this, [[1, 8]]);
}));
function getInventoriesByType(_x) {
return _getInventoriesByType.apply(this, arguments);
}
return getInventoriesByType;
}(),
getInventoryDetail: function () {
var _getInventoryDetail = _asyncToGenerator( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee3(id) {
var response;
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
this.inventoryEntryData.entries = 0;
_context3.prev = 1;
_context3.next = 4;
return _services_inventary_service__WEBPACK_IMPORTED_MODULE_2__["getInventaryId"](id);
case 4:
response = _context3.sent;
this.inventoryEntryData.cost = response.data.data.cost;
this.units = response.data.data.units;
this.final_units = response.data.data.units;
_context3.next = 13;
break;
case 10:
_context3.prev = 10;
_context3.t0 = _context3["catch"](1);
console.log(_context3.t0.response);
case 13:
case "end":
return _context3.stop();
}
}
}, _callee3, this, [[1, 10]]);
}));
function getInventoryDetail(_x2) {
return _getInventoryDetail.apply(this, arguments);
}
return getInventoryDetail;
}(),
finalUnits: function finalUnits() {
if (this.inventoryEntryData.entries == '') {
this.final_units = this.units;
} else {
var op = this.units + parseInt(this.inventoryEntryData.entries);
this.final_units = parseInt(op);
}
},
addInventoryEntry: function () {
var _addInventoryEntry = _asyncToGenerator( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee4() {
var _this = this;
var formData, response, result;
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee4$(_context4) {
while (1) {
switch (_context4.prev = _context4.next) {
case 0:
this.$v.$touch();
if (!(this.$v.$pendding || this.$v.$error)) {
_context4.next = 3;
break;
}
return _context4.abrupt("return");
case 3:
formData = new FormData();
formData.append('inventory_type_id', this.inventoryEntryData.inventory_type_id);
formData.append('bill', this.inventoryEntryData.bill);
formData.append('inventory_id', this.inventoryEntryData.inventory_id);
formData.append('entries', this.inventoryEntryData.entries);
formData.append('cost', this.inventoryEntryData.cost);
_context4.prev = 9;
_context4.next = 12;
return _services_inventory_entry_service__WEBPACK_IMPORTED_MODULE_3__["createInventoryEntry"](formData);
case 12:
response = _context4.sent;
if (response.status == 200) {
this.hideInventoryEntryModal();
this.$emit("loadInventoryEntries");
this.cleanForm();
setTimeout(function () {
_this.makeToast('Realizado', 'Registro completado', 'success');
}, 2000);
}
_context4.next = 20;
break;
case 16:
_context4.prev = 16;
_context4.t0 = _context4["catch"](9);
result = _context4.t0.response;
if (result) {
this.makeToast('Advertencia', 'Validar todos los campos', 'warning');
}
case 20:
case "end":
return _context4.stop();
}
}
}, _callee4, this, [[9, 16]]);
}));
function addInventoryEntry() {
return _addInventoryEntry.apply(this, arguments);
}
return addInventoryEntry;
}(),
hideInventoryEntryModal: function hideInventoryEntryModal() {
this.$v.$reset();
this.$refs.inventoryEntryModal.hide();
this.cleanForm();
this.clearData();
},
cleanForm: function cleanForm() {
this.final_units = '', this.inventoryEntryData = {
inventory_type_id: '',
bill: '',
inventory_id: '',
entries: '',
cost: 0
};
},
clearData: function clearData() {
this.validationErrors = '';
this.inventories = '';
this.inventoryEntryData.cost = 0;
this.inventoryEntryData.entries = 0;
this.final_units = '';
},
makeToast: function makeToast(title, text, type) {
this.toastCount++;
this.$bvToast.toast(text, {
title: title,
variant: type,
autoHideDelay: 3000,
appendToast: true
});
}
}
});
/***/ }),
/***/ "./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=style&index=0&lang=css&":
/*!**************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader??ref--6-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-2!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=style&index=0&lang=css& ***!
\**************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(/*! ../../../../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
// imports
// module
exports.push([module.i, "\n.errors {\n color: red;\n font-size: 14px;\n}\n", ""]);
// exports
/***/ }),
/***/ "./node_modules/style-loader/index.js!./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=style&index=0&lang=css&":
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/style-loader!./node_modules/css-loader??ref--6-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-2!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=style&index=0&lang=css& ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var content = __webpack_require__(/*! !../../../../node_modules/css-loader??ref--6-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src??ref--6-2!../../../../node_modules/vue-loader/lib??vue-loader-options!./AddInventoryEntry.vue?vue&type=style&index=0&lang=css& */ "./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=style&index=0&lang=css&");
if(typeof content === 'string') content = [[module.i, content, '']];
var transform;
var insertInto;
var options = {"hmr":true}
options.transform = transform
options.insertInto = undefined;
var update = __webpack_require__(/*! ../../../../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);
if(content.locals) module.exports = content.locals;
if(false) {}
/***/ }),
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/ErrorValidation/ErrorValidation.vue?vue&type=template&id=151f8810&":
/*!**********************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/ErrorValidation/ErrorValidation.vue?vue&type=template&id=151f8810& ***!
\**********************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _vm.validationErrors
? _c("div", [
_c(
"ul",
{ staticClass: "alert alert-warning" },
_vm._l(_vm.validationErrors, function(value, key, index) {
return _c("li", { key: index }, [_vm._v(_vm._s(value))])
}),
0
)
])
: _vm._e()
}
var staticRenderFns = []
render._withStripped = true
/***/ }),
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=template&id=44a3912e&":
/*!***********************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=template&id=44a3912e& ***!
\***********************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"div",
[
_c(
"b-modal",
{
ref: "inventoryEntryModal",
attrs: {
id: "modal-1",
"hide-footer": "",
title: "Agregar Entrada Inventario",
scrollable: ""
}
},
[
_c(
"div",
{ staticClass: "d-block" },
[
_vm.validationErrors
? _c("ErrorValidation", {
attrs: { errors: _vm.validationErrors }
})
: _vm._e(),
_vm._v(" "),
_c(
"form",
{
on: {
submit: function($event) {
$event.preventDefault()
return _vm.addInventoryEntry($event)
}
}
},
[
_c("div", { staticClass: "form-row" }, [
_c("div", { staticClass: "form-group col-md-6" }, [
_c("label", { attrs: { for: "bill" } }, [
_vm._v("Factura de compra")
]),
_vm._v(" "),
_c("input", {
directives: [
{
name: "model",
rawName: "v-model.trim",
value: _vm.$v.inventoryEntryData.bill.$model,
expression: "$v.inventoryEntryData.bill.$model",
modifiers: { trim: true }
}
],
staticClass: "form-control",
class: {
"is-invalid": _vm.validationStatus(
_vm.$v.inventoryEntryData.bill
)
},
attrs: {
type: "text",
id: "bill",
placeholder: "Escriba la factura de compra"
},
domProps: {
value: _vm.$v.inventoryEntryData.bill.$model
},
on: {
blur: [
function($event) {
return _vm.$v.inventoryEntryData.bill.$touch()
},
function($event) {
return _vm.$forceUpdate()
}
],
input: function($event) {
if ($event.target.composing) {
return
}
_vm.$set(
_vm.$v.inventoryEntryData.bill,
"$model",
$event.target.value.trim()
)
}
}
}),
_vm._v(" "),
_vm.$v.inventoryEntryData.bill.$error
? _c("span", { staticClass: "errors" }, [
_vm._v(_vm._s(_vm.message))
])
: _vm._e()
]),
_vm._v(" "),
_c("div", { staticClass: "form-group col-md-6" }, [
_c("label", [_vm._v("Tipo Inventario")]),
_vm._v(" "),
_c(
"select",
{
directives: [
{
name: "model",
rawName: "v-model.trim",
value:
_vm.$v.inventoryEntryData.inventory_type_id
.$model,
expression:
"$v.inventoryEntryData.inventory_type_id.$model",
modifiers: { trim: true }
}
],
staticClass: "form-control",
class: {
"is-invalid": _vm.validationStatus(
_vm.$v.inventoryEntryData.inventory_type_id
)
},
attrs: { id: "inventory_type_id" },
on: {
change: [
function($event) {
var $$selectedVal = Array.prototype.filter
.call($event.target.options, function(o) {
return o.selected
})
.map(function(o) {
var val = "_value" in o ? o._value : o.value
return val
})
_vm.$set(
_vm.$v.inventoryEntryData.inventory_type_id,
"$model",
$event.target.multiple
? $$selectedVal
: $$selectedVal[0]
)
},
function($event) {
return _vm.getInventoriesByType(
_vm.inventoryEntryData.inventory_type_id
)
}
],
blur: function($event) {
return _vm.$v.inventoryEntryData.inventory_type_id.$touch()
}
}
},
[
_c(
"option",
{
attrs: { value: "", selected: "", disabled: "" }
},
[_vm._v("Seleccione un registro...")]
),
_vm._v(" "),
_vm._l(_vm.inventaryTypes, function(
inventoryType,
index
) {
return _c(
"option",
{
key: index,
domProps: { value: inventoryType.id }
},
[_vm._v(_vm._s(inventoryType.name))]
)
})
],
2
)
])
]),
_vm._v(" "),
_c("div", { staticClass: "form-row" }, [
_c("div", { staticClass: "form-group col-md-6" }, [
_c("label", [_vm._v("Artículo")]),
_vm._v(" "),
_c(
"select",
{
directives: [
{
name: "model",
rawName: "v-model.trim",
value:
_vm.$v.inventoryEntryData.inventory_id.$model,
expression:
"$v.inventoryEntryData.inventory_id.$model",
modifiers: { trim: true }
}
],
staticClass: "form-control",
class: {
"is-invalid": _vm.validationStatus(
_vm.$v.inventoryEntryData.inventory_id
)
},
attrs: { id: "inventory_id" },
on: {
change: [
function($event) {
var $$selectedVal = Array.prototype.filter
.call($event.target.options, function(o) {
return o.selected
})
.map(function(o) {
var val = "_value" in o ? o._value : o.value
return val
})
_vm.$set(
_vm.$v.inventoryEntryData.inventory_id,
"$model",
$event.target.multiple
? $$selectedVal
: $$selectedVal[0]
)
},
function($event) {
return _vm.getInventoryDetail(
_vm.inventoryEntryData.inventory_id
)
}
],
blur: function($event) {
return _vm.$v.inventoryEntryData.inventory_id.$touch()
}
}
},
[
_c(
"option",
{
attrs: { value: "", selected: "", disabled: "" }
},
[_vm._v("Seleccione un registro...")]
),
_vm._v(" "),
_vm._l(_vm.inventories, function(inventory, index) {
return _c(
"option",
{ key: index, domProps: { value: inventory.id } },
[_vm._v(_vm._s(inventory.description))]
)
})
],
2
)
]),
_vm._v(" "),
_c(
"div",
{ staticClass: "form-group col-md-6" },
[
_c("label", { attrs: { for: "entries" } }, [
_vm._v("Entradas")
]),
_vm._v(" "),
_c("input", {
directives: [
{
name: "model",
rawName: "v-model.trim",
value: _vm.$v.inventoryEntryData.entries.$model,
expression:
"$v.inventoryEntryData.entries.$model",
modifiers: { trim: true }
}
],
staticClass: "form-control",
class: {
"is-invalid": _vm.validationStatus(
_vm.$v.inventoryEntryData.entries
)
},
attrs: {
type: "text",
id: "entries",
placeholder: "Escriba las entradas"
},
domProps: {
value: _vm.$v.inventoryEntryData.entries.$model
},
on: {
change: _vm.finalUnits,
blur: [
function($event) {
return _vm.$v.inventoryEntryData.entries.$touch()
},
function($event) {
return _vm.$forceUpdate()
}
],
input: function($event) {
if ($event.target.composing) {
return
}
_vm.$set(
_vm.$v.inventoryEntryData.entries,
"$model",
$event.target.value.trim()
)
}
}
}),
_vm._v(" "),
_vm._l(_vm.entriesErrors, function(error) {
return _c(
"span",
{ key: error, staticClass: "errors" },
[_vm._v(_vm._s(error))]
)
})
],
2
)
]),
_vm._v(" "),
_c("div", { staticClass: "form-row" }, [
_c(
"div",
{ staticClass: "form-group col-md-6" },
[
_c("label", { attrs: { for: "cost" } }, [
_vm._v("Costo")
]),
_vm._v(" "),
_c("currency-input", {
staticClass: "form-control",
class: {
"is-invalid": _vm.validationStatus(
_vm.$v.inventoryEntryData.cost
)
},
attrs: { type: "text", id: "cost" },
on: {
blur: function($event) {
return _vm.$v.inventoryEntryData.cost.$touch()
}
},
model: {
value: _vm.$v.inventoryEntryData.cost.$model,
callback: function($$v) {
_vm.$set(
_vm.$v.inventoryEntryData.cost,
"$model",
typeof $$v === "string" ? $$v.trim() : $$v
)
},
expression: "$v.inventoryEntryData.cost.$model"
}
}),
_vm._v(" "),
_vm.$v.inventoryEntryData.cost.$error
? _c("span", { staticClass: "errors" }, [
_vm._v(_vm._s(_vm.message))
])
: _vm._e()
],
1
),
_vm._v(" "),
_c("div", { staticClass: "form-group col-md-6" }, [
_c("label", { attrs: { for: "entries" } }, [
_vm._v("Saldo Final")
]),
_vm._v(" "),
_c("input", {
directives: [
{
name: "model",
rawName: "v-model",
value: _vm.final_units,
expression: "final_units"
}
],
staticClass: "form-control",
attrs: { type: "text", id: "entries", disabled: "" },
domProps: { value: _vm.final_units },
on: {
input: function($event) {
if ($event.target.composing) {
return
}
_vm.final_units = $event.target.value
}
}
})
])
]),
_vm._v(" "),
_c("hr"),
_vm._v(" "),
_c("div", { staticClass: "text-right" }, [
_c(
"button",
{
staticClass: "btn btn-danger",
attrs: { type: "button" },
on: { click: _vm.hideInventoryEntryModal }
},
[_vm._v("Cancelar")]
),
_vm._v(" "),
_c(
"button",
{
staticClass: "btn btn-primary",
attrs: {
disabled: _vm.$v.inventoryEntryData.$invalid,
type: "submit"
}
},
[
_c("span", { staticClass: "fa fa-check" }),
_vm._v(" Guardar")
]
)
])
]
)
],
1
)
]
)
],
1
)
}
var staticRenderFns = []
render._withStripped = true
/***/ }),
/***/ "./resources/js/components/ErrorValidation/ErrorValidation.vue":
/*!*********************************************************************!*\
!*** ./resources/js/components/ErrorValidation/ErrorValidation.vue ***!
\*********************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _ErrorValidation_vue_vue_type_template_id_151f8810___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ErrorValidation.vue?vue&type=template&id=151f8810& */ "./resources/js/components/ErrorValidation/ErrorValidation.vue?vue&type=template&id=151f8810&");
/* harmony import */ var _ErrorValidation_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ErrorValidation.vue?vue&type=script&lang=js& */ "./resources/js/components/ErrorValidation/ErrorValidation.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport *//* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
/* normalize component */
var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
_ErrorValidation_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_ErrorValidation_vue_vue_type_template_id_151f8810___WEBPACK_IMPORTED_MODULE_0__["render"],
_ErrorValidation_vue_vue_type_template_id_151f8810___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "resources/js/components/ErrorValidation/ErrorValidation.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ "./resources/js/components/ErrorValidation/ErrorValidation.vue?vue&type=script&lang=js&":
/*!**********************************************************************************************!*\
!*** ./resources/js/components/ErrorValidation/ErrorValidation.vue?vue&type=script&lang=js& ***!
\**********************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ErrorValidation_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib??ref--4-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./ErrorValidation.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/ErrorValidation/ErrorValidation.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ErrorValidation_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./resources/js/components/ErrorValidation/ErrorValidation.vue?vue&type=template&id=151f8810&":
/*!****************************************************************************************************!*\
!*** ./resources/js/components/ErrorValidation/ErrorValidation.vue?vue&type=template&id=151f8810& ***!
\****************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_ErrorValidation_vue_vue_type_template_id_151f8810___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib??vue-loader-options!./ErrorValidation.vue?vue&type=template&id=151f8810& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/ErrorValidation/ErrorValidation.vue?vue&type=template&id=151f8810&");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_ErrorValidation_vue_vue_type_template_id_151f8810___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_ErrorValidation_vue_vue_type_template_id_151f8810___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/***/ }),
/***/ "./resources/js/components/InventoryEntry/AddInventoryEntry.vue":
/*!**********************************************************************!*\
!*** ./resources/js/components/InventoryEntry/AddInventoryEntry.vue ***!
\**********************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _AddInventoryEntry_vue_vue_type_template_id_44a3912e___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AddInventoryEntry.vue?vue&type=template&id=44a3912e& */ "./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=template&id=44a3912e&");
/* harmony import */ var _AddInventoryEntry_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AddInventoryEntry.vue?vue&type=script&lang=js& */ "./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport *//* harmony import */ var _AddInventoryEntry_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AddInventoryEntry.vue?vue&type=style&index=0&lang=css& */ "./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=style&index=0&lang=css&");
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
/* normalize component */
var component = Object(_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
_AddInventoryEntry_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
_AddInventoryEntry_vue_vue_type_template_id_44a3912e___WEBPACK_IMPORTED_MODULE_0__["render"],
_AddInventoryEntry_vue_vue_type_template_id_44a3912e___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "resources/js/components/InventoryEntry/AddInventoryEntry.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);
/***/ }),
/***/ "./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=script&lang=js&":
/*!***********************************************************************************************!*\
!*** ./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=script&lang=js& ***!
\***********************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_AddInventoryEntry_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib??ref--4-0!../../../../node_modules/vue-loader/lib??vue-loader-options!./AddInventoryEntry.vue?vue&type=script&lang=js& */ "./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=script&lang=js&");
/* empty/unused harmony star reexport */ /* harmony default export */ __webpack_exports__["default"] = (_node_modules_babel_loader_lib_index_js_ref_4_0_node_modules_vue_loader_lib_index_js_vue_loader_options_AddInventoryEntry_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=style&index=0&lang=css&":
/*!*******************************************************************************************************!*\
!*** ./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=style&index=0&lang=css& ***!
\*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_6_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_vue_loader_lib_index_js_vue_loader_options_AddInventoryEntry_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader!../../../../node_modules/css-loader??ref--6-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src??ref--6-2!../../../../node_modules/vue-loader/lib??vue-loader-options!./AddInventoryEntry.vue?vue&type=style&index=0&lang=css& */ "./node_modules/style-loader/index.js!./node_modules/css-loader/index.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=style&index=0&lang=css&");
/* harmony import */ var _node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_6_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_vue_loader_lib_index_js_vue_loader_options_AddInventoryEntry_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_6_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_vue_loader_lib_index_js_vue_loader_options_AddInventoryEntry_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_6_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_vue_loader_lib_index_js_vue_loader_options_AddInventoryEntry_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_style_loader_index_js_node_modules_css_loader_index_js_ref_6_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_2_node_modules_vue_loader_lib_index_js_vue_loader_options_AddInventoryEntry_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/***/ }),
/***/ "./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=template&id=44a3912e&":
/*!*****************************************************************************************************!*\
!*** ./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=template&id=44a3912e& ***!
\*****************************************************************************************************/
/*! exports provided: render, staticRenderFns */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_AddInventoryEntry_vue_vue_type_template_id_44a3912e___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib??vue-loader-options!./AddInventoryEntry.vue?vue&type=template&id=44a3912e& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/InventoryEntry/AddInventoryEntry.vue?vue&type=template&id=44a3912e&");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_AddInventoryEntry_vue_vue_type_template_id_44a3912e___WEBPACK_IMPORTED_MODULE_0__["render"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_AddInventoryEntry_vue_vue_type_template_id_44a3912e___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
/***/ }),
/***/ "./resources/js/services/http_service.js":
/*!***********************************************!*\
!*** ./resources/js/services/http_service.js ***!
\***********************************************/
/*! exports provided: http, httpFile */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "http", function() { return http; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "httpFile", function() { return httpFile; });
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../store */ "./resources/js/store.js");
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! axios */ "./node_modules/axios/index.js");
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
function http() {
return axios__WEBPACK_IMPORTED_MODULE_1___default.a.create({
baseURL: _store__WEBPACK_IMPORTED_MODULE_0__["default"].state.apiURL
});
}
function httpFile() {
return axios__WEBPACK_IMPORTED_MODULE_1___default.a.create({
baseURL: _store__WEBPACK_IMPORTED_MODULE_0__["default"].state.apiURL,
headers: {
'Content-Type': 'multipart/form-data'
}
});
}
/***/ }),
/***/ "./resources/js/services/inventaryType_service.js":
/*!********************************************************!*\
!*** ./resources/js/services/inventaryType_service.js ***!
\********************************************************/
/*! exports provided: createInventaryType, getInventaryTypes, deleteInventaryType, updateInventaryType */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createInventaryType", function() { return createInventaryType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInventaryTypes", function() { return getInventaryTypes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deleteInventaryType", function() { return deleteInventaryType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateInventaryType", function() { return updateInventaryType; });
/* harmony import */ var _http_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http_service */ "./resources/js/services/http_service.js");
function createInventaryType(data) {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])().post('/inventory_type', data);
}
function getInventaryTypes() {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])().get('/inventory_types');
}
function deleteInventaryType(id) {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])()["delete"]("inventory_type/".concat(id));
}
function updateInventaryType(id, data) {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])().post("inventory_type/".concat(id), data);
}
/***/ }),
/***/ "./resources/js/services/inventary_service.js":
/*!****************************************************!*\
!*** ./resources/js/services/inventary_service.js ***!
\****************************************************/
/*! exports provided: createInventary, getInventary, getInventaryId, getInventoriesByType, updateInventary, deleteInventary */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createInventary", function() { return createInventary; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInventary", function() { return getInventary; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInventaryId", function() { return getInventaryId; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInventoriesByType", function() { return getInventoriesByType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateInventary", function() { return updateInventary; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deleteInventary", function() { return deleteInventary; });
/* harmony import */ var _http_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http_service */ "./resources/js/services/http_service.js");
function createInventary(data) {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])().post('/inventory', data);
}
function getInventary() {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])().get('/inventory');
}
function getInventaryId(id) {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])().get("inventory/".concat(id));
}
function getInventoriesByType(id) {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])().get("inventoriesByType/".concat(id));
}
function updateInventary(id, data) {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])().post("inventory/".concat(id), data);
}
function deleteInventary(id) {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])()["delete"]("inventory/".concat(id));
}
/***/ }),
/***/ "./resources/js/services/inventory_entry_service.js":
/*!**********************************************************!*\
!*** ./resources/js/services/inventory_entry_service.js ***!
\**********************************************************/
/*! exports provided: createInventoryEntry, getInventoryEntries, getInventoryEntryId, updateInventoryEntry, deleteInventoryEntry */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createInventoryEntry", function() { return createInventoryEntry; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInventoryEntries", function() { return getInventoryEntries; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInventoryEntryId", function() { return getInventoryEntryId; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateInventoryEntry", function() { return updateInventoryEntry; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deleteInventoryEntry", function() { return deleteInventoryEntry; });
/* harmony import */ var _http_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http_service */ "./resources/js/services/http_service.js");
function createInventoryEntry(data) {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])().post('/inventory_entry', data);
}
function getInventoryEntries() {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])().get('/inventory_entry');
}
function getInventoryEntryId(id) {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])().get("inventory_entry/".concat(id));
}
function updateInventoryEntry(id, data) {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])().post("inventory_entry/".concat(id), data);
}
function deleteInventoryEntry(id) {
return Object(_http_service__WEBPACK_IMPORTED_MODULE_0__["http"])()["delete"]("inventory_entry/".concat(id));
}
/***/ })
}]); | 48.880254 | 1,012 | 0.532399 |
83c6827726a3fb05ddddf609f8eb60c9507258c1 | 1,541 | js | JavaScript | test/options/language/language_aria.js | andreamaiolo/DataTablesSrc | 8c5dd958f06609eee9b230f6ffe2cc8d9ecfe8dd | [
"MIT"
] | null | null | null | test/options/language/language_aria.js | andreamaiolo/DataTablesSrc | 8c5dd958f06609eee9b230f6ffe2cc8d9ecfe8dd | [
"MIT"
] | null | null | null | test/options/language/language_aria.js | andreamaiolo/DataTablesSrc | 8c5dd958f06609eee9b230f6ffe2cc8d9ecfe8dd | [
"MIT"
] | 1 | 2019-02-22T14:59:06.000Z | 2019-02-22T14:59:06.000Z | describe( "language.aria option ", function() {
dt.libs( {
js: [ 'jquery', 'datatables' ],
css: [ 'datatables' ]
} );
describe("Check the defaults", function () {
dt.html( 'basic' );
it("Can we set pagination aria controls different from normal paginate", function () {
$('#example').DataTable( {
pagingType: 'full',
language: {
paginate: {
first: '«',
previous: '‹',
next: '›',
last: '»'
},
aria: {
paginate: {
first: 'First',
previous: 'Previous',
next: 'Next',
last: 'Last'
}
}
}
} );
expect( $('#example_next').attr('aria-label') == "Next" &&
$('#example_previous').attr('aria-label') == "Previous" &&
$('#example_first').attr('aria-label') == "First" &&
$('#example_last').attr('aria-label') == "Last").toBe(true);
});
dt.html( 'basic' );
it("Language aria sortAsc", function () {
$('#example').DataTable( {
pagingType: 'full',
language: {
"aria": {
"sortAscending": "test case"
}
}
} );
$('#example thead th:eq(0)').click();
expect( $('#example thead th:eq(0)').attr('aria-label') == "Nametest case").toBe(true);
});
dt.html( 'basic' );
it("Language Aria sortDesc", function () {
$('#example').DataTable( {
pagingType: 'full',
language: {
"aria": {
"sortDescending": "test case1"
}
}
} );
expect( $('#example thead th:eq(0)').attr('aria-label') == "Nametest case1").toBe(true);
});
});
});
| 23.707692 | 91 | 0.510058 |
83c6d9254fcfeaea3cf40f3b70d23492cee33293 | 2,920 | js | JavaScript | modules/flowable-ui/flowable-ui-idm-frontend/src/main/resources/static/idm/scripts/common/services/user-service.js | jiandiao/flowable-engine | 1bd26b2b2706fc334264603c69bd021c9152f244 | [
"Apache-2.0"
] | 5,250 | 2016-10-13T08:15:16.000Z | 2022-03-31T13:53:26.000Z | modules/flowable-ui/flowable-ui-idm-frontend/src/main/resources/static/idm/scripts/common/services/user-service.js | jiandiao/flowable-engine | 1bd26b2b2706fc334264603c69bd021c9152f244 | [
"Apache-2.0"
] | 1,736 | 2016-10-13T17:03:10.000Z | 2022-03-31T19:27:39.000Z | modules/flowable-ui/flowable-ui-idm-frontend/src/main/resources/static/idm/scripts/common/services/user-service.js | jiandiao/flowable-engine | 1bd26b2b2706fc334264603c69bd021c9152f244 | [
"Apache-2.0"
] | 2,271 | 2016-10-13T08:27:26.000Z | 2022-03-31T15:36:02.000Z | /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
// User service
flowableModule.service('UserService', ['$http', '$q',
function ($http, $q) {
var httpAsPromise = function(options) {
var deferred = $q.defer();
$http(options).
success(function (response, status, headers, config) {
deferred.resolve(response);
})
.error(function (response, status, headers, config) {
deferred.reject(response);
});
return deferred.promise;
};
/*
* Filter users based on a filter text, in the context of workflow: for tasks, processes, etc.
*/
this.getFilteredUsers = function (filterText, taskId, processInstanceId, tenantId, group) {
var params = {};
if (typeof filterText === 'string') {
params.filter = filterText;
}
else {
// Could be i.e. { email: 'user@domain.com' } or { externalId: 'externalUserId' }
params = filterText;
}
if(taskId) {
params.excludeTaskId = taskId;
}
if (processInstanceId) {
params.excludeProcessId = processInstanceId;
}
if (group && group.id) {
params.groupId = group.id;
}
return httpAsPromise({
method: 'GET',
url: FLOWABLE.CONFIG.contextIdmRestRoot + '/rest/workflow-users',
params: params
});
};
/*
* Filter users based on a filter text, in the context of IDM: use no context (contrary to the getFilteredUsers method).
*/
this.getFilteredUsersStrict = function(filterText, tenantId, group) {
var params = {};
params.status = 'active';
if (filterText !== null && filterText !== undefined) {
params.filter = filterText;
}
if (group && group.id) {
params.groupId = group.id;
}
return httpAsPromise(
{
method: 'GET',
url: FLOWABLE.CONFIG.contextIdmRestRoot + '/rest/admin/users',
params: params
}
)
};
}]);
| 33.181818 | 128 | 0.527397 |
83c6e1e52d8f6889e4a9dddc9e2f079f69f19184 | 821 | js | JavaScript | src/renderer/plugin/bus.js | qqqpos/entree | 2668db9839f68767a7a70044d1c7a85b6ff2f7a4 | [
"MIT"
] | null | null | null | src/renderer/plugin/bus.js | qqqpos/entree | 2668db9839f68767a7a70044d1c7a85b6ff2f7a4 | [
"MIT"
] | null | null | null | src/renderer/plugin/bus.js | qqqpos/entree | 2668db9839f68767a7a70044d1c7a85b6ff2f7a4 | [
"MIT"
] | null | null | null | const VueBus = {
install(Vue, options) {
var bus = new Vue();
Object.defineProperties(bus, {
on: {
get: function () {
return this.$on;
}
},
once: {
get: function () {
return this.$once;
}
},
off: {
get: function () {
return this.$off;
}
},
emit: {
get: function () {
return this.$emit;
}
}
});
Vue.bus = bus;
Object.defineProperty(Vue.prototype, '$bus', {
get: function () {
return bus;
}
})
}
}
export default VueBus; | 22.189189 | 54 | 0.314251 |
83c6f1e6db07fc40455a8612b51c511c0b4b043d | 412 | js | JavaScript | app/middleware/restrict_to_sandbox.js | quis/pay-selfservice | 0d44edd7dec3d0467d792079b8b04c3e6583e991 | [
"MIT"
] | null | null | null | app/middleware/restrict_to_sandbox.js | quis/pay-selfservice | 0d44edd7dec3d0467d792079b8b04c3e6583e991 | [
"MIT"
] | null | null | null | app/middleware/restrict_to_sandbox.js | quis/pay-selfservice | 0d44edd7dec3d0467d792079b8b04c3e6583e991 | [
"MIT"
] | null | null | null | 'use strict'
// NPM dependencies
const lodash = require('lodash')
// Local dependencies
const {renderErrorView} = require('../utils/response')
module.exports = (req, res, next) => {
const provider = lodash.get(req, 'account.payment_provider', '')
if (provider.toLowerCase() !== 'sandbox') {
renderErrorView(req, res, 'This page is only available on Sandbox accounts', 403)
} else {
next()
}
}
| 24.235294 | 85 | 0.669903 |
83c7258f2ad44669f7ed67a94debe8e400c06b03 | 1,483 | js | JavaScript | api/index-router.js | Game-Picker/postgres-back-end | 3eccf4a676fe5d0ae60fc0f9104355c125a4469b | [
"MIT"
] | null | null | null | api/index-router.js | Game-Picker/postgres-back-end | 3eccf4a676fe5d0ae60fc0f9104355c125a4469b | [
"MIT"
] | null | null | null | api/index-router.js | Game-Picker/postgres-back-end | 3eccf4a676fe5d0ae60fc0f9104355c125a4469b | [
"MIT"
] | null | null | null | // *** [ Router Declaration ] *** //
const router = require("express").Router();
// *** [ Function To Get Time API Was Accessed ] *** //
const getDate = (timeElapsed) => {
const today = new Date(timeElapsed);
return today;
};
// *** [ API Landing Route ] *** //
router.get("/", (req, res) => {
res.status(200).send(`
<h1>Postgres Game Picker API Documentation</h1>
<ul>
<li>Base URL: https://gamers-choice.herokuapp.com/</li>
</ul>
<br />
<h3>Authentication:</h3>
<ul>
<li>Post - /auth/register</li>
<li>Post - /auth/login</li>
</ul>
<br />
<h3>Users:</h3>
<ul>
<li>Get - /api/users - Gets all user profiles (Protected)</li>
<li>Get - /api/users/:id - Gets a specified user profile (Protected)</li>
<li>Put - /api/users/:id - Updates a specified user's profile (Protected)</li>
<li>Delete - /api/users/:id - Deletes a specified user's profile (Protected)</li>
</ul>
<br />
<h3>Video Games:</h3>
<ul>
<li>Get - /api/games - Gets all the games</li>
<li>Get - /api/games/:id - Gets a specified game</li>
<li>Post - /api/games - Creates a new game (Protected)</li>
<li>Put - /api/games/:id - Updates a specified game (Protected)</li>
<li>Delete - /api/games/:id - Deletes a specified game (Protected)</li>
</ul>
<p>Time Accessed: ${getDate(Date.now())}</p>
`);
});
// *** [ Exports ] *** //
module.exports = router;
| 32.23913 | 89 | 0.558328 |
83c7a12e6e7b978acb6396c1acde6d6a6a2fd0da | 353 | js | JavaScript | src/models/food.js | antoni909/basic-api-server | 646f0d714ca32aa6bc35799256378958026b7ea8 | [
"MIT"
] | null | null | null | src/models/food.js | antoni909/basic-api-server | 646f0d714ca32aa6bc35799256378958026b7ea8 | [
"MIT"
] | null | null | null | src/models/food.js | antoni909/basic-api-server | 646f0d714ca32aa6bc35799256378958026b7ea8 | [
"MIT"
] | null | null | null | 'use strict';
// contains schema for what food will have on it
const Food = (sequelize, DataTypes) =>
sequelize.define('Food', {
name: {
type: DataTypes.STRING,
required: true
},
calories: {
type: DataTypes.INTEGER,
required: false
}
});
// console.log('MODELS FOOD MODEL: ',Food)
module.exports = Food;
| 17.65 | 48 | 0.606232 |
83c8f893a31d3c69f5f21ce8844d034e2a7158f3 | 6,914 | js | JavaScript | public/js/chunks/188.js | nirjhala/project1 | d1ffab7b15c18a09be8cbcc9576754a7a5fe3f4b | [
"MIT"
] | null | null | null | public/js/chunks/188.js | nirjhala/project1 | d1ffab7b15c18a09be8cbcc9576754a7a5fe3f4b | [
"MIT"
] | null | null | null | public/js/chunks/188.js | nirjhala/project1 | d1ffab7b15c18a09be8cbcc9576754a7a5fe3f4b | [
"MIT"
] | null | null | null | (window.webpackJsonp=window.webpackJsonp||[]).push([[188],{600:function(t,e,a){"use strict";a.r(e);var s=a(4),o={data:function(){return{errors:0,lists:{},allSelected:0,check:[],s:"",allClasses:[],classes:[],loaded:0,bookId:"",token:localStorage.getItem("token")}},mounted:function(){this.getRecords(),this.getAllClasses()},methods:{searchAfterDebounce:a.n(s).a.debounce((function(){this.searchData()}),500),checkAll:function(){var t=this;t.check=[],t.allSelected||$.each(t.lists.data,(function(e,a){t.check.push(a.id)}))},assignClass:function(){var t=this,e=this.classes,a=this.bookId;this.loaded=0;var s={classes:e,bookId:a};axios.create({baseURL:this.apiBaseUrl,headers:{Authorization:"Bearer "+this.token,Accept:"application/json"}}).post("assign-book-class",s).then((function(e){t.loaded=1,$("#classModal").modal("hide"),t.getRecords(1)}))},showClassPop:function(t,e){this.bookId=t;var a=[];$(e).each((function(t,e){a.push(e.class)})),this.classes=a,$("#classModal").modal("show")},getAllClasses:function(){var t=this;this.loaded=0,axios.create({baseURL:this.apiBaseUrl,headers:{Authorization:"Bearer "+this.token,Accept:"application/json"}}).get("get-all-classes").then((function(e){t.loaded=1,t.allClasses=e.data}))},searchData:function(t){var e=this,a=this.s;void 0===t&&(t=1),this.loaded=0,axios.create({baseURL:this.apiBaseUrl,headers:{Authorization:"Bearer "+this.token,Accept:"application/json"}}).get("book/search/?page="+t+"&s="+a).then((function(t){e.loaded=1,t.status?e.lists=t.data.data:e.errors=1})).catch((function(t){e.loaded=1,console.log(t)}))},getRecords:function(t){var e=this;void 0===t&&(t=1),axios.create({baseURL:this.apiBaseUrl,headers:{Authorization:"Bearer "+this.token,Accept:"application/json"}}).get("book/?page="+t).then((function(t){e.loaded=1,t.status?e.lists=t.data:e.errors=1})).catch((function(t){e.loaded=1,console.log(t)}))},deleteRecord:function(){var t=this,e={check:this.check};$(this).closest("form");if(!(this.check.length>0))return this.loaded=1,swal("Warning","Please select at least one record to delete.","warning"),!1;swal({title:"Are you sure?",text:"Once deleted, you will not be able to recover this record!",icon:"warning",buttons:!0,dangerMode:!0}).then((function(a){a&&(t.loaded=0,axios.create({baseURL:t.apiBaseUrl,headers:{Authorization:"Bearer "+t.token,Accept:"application/json"}}).post("remove-book",e).then((function(e){e.status?(t.getRecords(),t.$toast.success("Selected record(s) has been deleted.")):(t.loaded=1,t.$toast.warning("Record(s) unable to delete."))})).catch((function(e){t.loaded=1,console.log(e)})))}))}},watch:{s:function(t){this.searchAfterDebounce()}}},i=a(0),l=Object(i.a)(o,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"dashboard-content-one"},[a("div",{staticClass:"breadcrumbs-area"},[a("div",{staticClass:"float-right"},[a("router-link",{staticClass:"fw-btn-fill btn-gradient-yellow text-white",attrs:{to:{name:"add-book"}}},[t._v("Add New")])],1),t._v(" "),a("h3",[t._v("Book")]),t._v(" "),a("ul",[a("li",[a("router-link",{attrs:{to:{name:"dashboard"}}},[t._v("Dashboard")])],1),t._v(" "),a("li",[t._v("Book")])])]),t._v(" "),a("div",{staticClass:"mg-b-20"},[a("div",{staticClass:"row gutters-8"},[a("div",{staticClass:"col-4-xxxl col-xl-4 col-lg-3 col-12 form-group"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.s,expression:"s"}],staticClass:"form-control bg-white",attrs:{type:"text",placeholder:"Search ..."},domProps:{value:t.s},on:{input:function(e){e.target.composing||(t.s=e.target.value)}}})])])]),t._v(" "),a("form",{attrs:{method:"post"},on:{submit:function(e){return e.preventDefault(),t.deleteRecord()}}},[a("div",{staticClass:"card height-auto"},[a("div",{staticClass:"card-body"},[t.loaded?t._e():a("div",{staticClass:"text-center"},[a("b-spinner")],1),t._v(" "),t.loaded?a("div",[t._m(0),t._v(" "),t.lists?t._e():a("div",{staticClass:"alert alert-warning"},[a("i",{staticClass:"fa fa-exclamation-circle"}),t._v("\n No record(s) found.\n ")]),t._v(" "),t.lists?a("div",{staticClass:"table-responsive"},[a("table",{staticClass:"table display data-table text-nowrap"},[a("thead",[a("tr",[a("th",[a("div",{staticClass:"form-check"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.allSelected,expression:"allSelected"}],staticClass:"form-check-input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.allSelected)?t._i(t.allSelected,null)>-1:t.allSelected},on:{click:function(e){return t.checkAll()},change:function(e){var a=t.allSelected,s=e.target,o=!!s.checked;if(Array.isArray(a)){var i=t._i(a,null);s.checked?i<0&&(t.allSelected=a.concat([null])):i>-1&&(t.allSelected=a.slice(0,i).concat(a.slice(i+1)))}else t.allSelected=o}}}),t._v(" "),a("label",{staticClass:"form-check-label"},[t._v("Sr. No.")])])]),t._v(" "),a("th",[t._v("Title")]),t._v(" "),a("th",[t._v("Author")]),t._v(" "),a("th",[t._v("Publisher")]),t._v(" "),a("th",[t._v("Price")]),t._v(" "),a("th",[t._v("Barcode")])])]),t._v(" "),a("tbody",t._l(t.lists.data,(function(e,s){return a("tr",{key:s},[a("td",[a("div",{staticClass:"form-check"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.check,expression:"check"}],key:t.lists.from+s,staticClass:"form-check-input",attrs:{type:"checkbox"},domProps:{value:e.id,checked:Array.isArray(t.check)?t._i(t.check,e.id)>-1:t.check},on:{change:function(a){var s=t.check,o=a.target,i=!!o.checked;if(Array.isArray(s)){var l=e.id,c=t._i(s,l);o.checked?c<0&&(t.check=s.concat([l])):c>-1&&(t.check=s.slice(0,c).concat(s.slice(c+1)))}else t.check=i}}}),t._v(" "),a("label",{staticClass:"form-check-label"},[t._v(t._s(t.lists.from+s)+".")])])]),t._v(" "),a("td",[a("router-link",{attrs:{to:{path:"book/edit/"+e.id,params:e},"data-toggle":"tooltip",title:"Edit"}},[a("i",{staticClass:"fa fa-edit"}),t._v("\n "+t._s(e.title))]),a("br"),t._v(" "),e.subtitle?a("small",[t._v("("+t._s(e.subtitle)+")")]):t._e()],1),t._v(" "),a("td",[t._v(t._s(e.author))]),t._v(" "),a("td",[t._v(t._s(e.publisher))]),t._v(" "),a("td",[t._v(t._s(e.price))]),t._v(" "),a("td",[a("div",{staticClass:"d-inline-block text-center"},[a("div",[a("img",{attrs:{src:e.barcode_image,alt:""}})]),t._v(" "),a("div",{staticStyle:{"letter-spacing":"5px","font-size":"8px",margin:"2px 0"}},[t._v("\n "+t._s(e.barcode)+"\n ")])])])])})),0)]),t._v(" "),a("pagination",{attrs:{data:t.lists},on:{"pagination-change-page":t.getRecords}})],1):t._e()]):t._e()])])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"heading-layout1"},[e("div",{staticClass:"item-title"},[e("h3",[this._v("All Book Data")])]),this._v(" "),e("button",{staticClass:"btn btn-link text-dark removeBtn",attrs:{type:"submit","data-toggle":"tooltip",title:"Remove"}},[e("i",{staticClass:"fa fa-trash fa-2x"})])])}],!1,null,null,null);e.default=l.exports}}]); | 6,914 | 6,914 | 0.654325 |
83c954f899fd3efd85f3f28cf0fdc5d7ec9aa69c | 15,185 | js | JavaScript | alaska-admin-view/alaska-admin-view.js | maichong/flow-declarations | cbe8f41ef21c84ce1d61a315432a714e5e20bc6b | [
"MIT"
] | null | null | null | alaska-admin-view/alaska-admin-view.js | maichong/flow-declarations | cbe8f41ef21c84ce1d61a315432a714e5e20bc6b | [
"MIT"
] | null | null | null | alaska-admin-view/alaska-admin-view.js | maichong/flow-declarations | cbe8f41ef21c84ce1d61a315432a714e5e20bc6b | [
"MIT"
] | null | null | null | import type { DependsQueryExpression } from 'check-depends';
import type { ImmutableObject, ImmutableArray } from 'seamless-immutable';
declare type Alaska$view$Field$Cell$Props = {
+model: Alaska$view$Model,
+field: Alaska$view$Field,
+value: any
}
declare type Alaska$view$Field$Filter$Props = {
+className: string,
+value: string | number | boolean,
+field: Alaska$view$Field,
+onChange: Function,
+onClose: Function,
}
declare type Alaska$view$Field$View$Props = {
+className: string,
+model: Alaska$view$Model,
+field: Alaska$view$Field,
+record: Object,
+errorText: string,
+disabled: boolean,
+value: any,
+onChange: Function,
}
declare type Alaska$view$Preview$Props = {
+model: Alaska$view$Model,
+columnList: Alaska$view$Field[],
+record: Alaska$view$Record,
+selected: boolean
}
declare type Alaska$view$Login = {
+errorMsg: '',
+show: boolean
}
declare type Alaska$view$User = {
+access: boolean,
+id: string,
+username: string,
+displayName: string,
+avatar: string,
+createdAt: string
}
declare type Alaska$view$Field = {
+label: string,
+path: string,
+required?: boolean,
+cell: string,
+view: string,
+filter: string,
+plain: string,
+default?: any,
+group?: string,
+ability?: string,
+super?: DependsQueryExpression,
+hidden?: DependsQueryExpression,
+depends?: DependsQueryExpression,
+disabled?: DependsQueryExpression,
+help?: string,
// layout
+fixed?: boolean,
+horizontal?: boolean,
+nolabel?: boolean,
// fields
// relationship
+filters?: Object,
+model?: string,
// select
+options?: Alaska$SelectField$option[],
+multi?: boolean,
+after?: string,
// date
+format?: string,
+cellFormat?: string,
+dateFormat?: string,
+timeFormat?: string,
// number
+max?: number,
+min?: number,
// balance
+unit?: string,
+size?: number,
+precision?: number,
// image
+allowed?: string[],
+target?: string,
+thumbSuffix?: string,
+defaultImage?: string,
+upload?: {
service: string,
model: string,
path: string,
leaveConfirm: string
},
}
declare type Alaska$view$Model = {
+modelName: string, // User
+id: string, // user
+path: string, // alaska-user.User
+key: string, // alaska-user.user
+label: string,
+serviceId: string,
+preview?: string,
+titleField: string,
+defaultSort: string,
+defaultColumns: string[],
+searchFields: string[],
+groups: {
[key: string]: Alaska$FieldGroup
},
+relationships: Alaska$Model$relationships,
+actions: Alaska$Model$actions,
+nocreate?: boolean,
+noupdate?: boolean,
+noremove?: boolean,
+noexport?: boolean,
+fields: {
[path: string]: Alaska$view$Field
},
+abilities: {
[ability: string]: true
},
canCreate: boolean,
canUpdate: boolean,
canRemove: boolean,
canUpdateRecord(record: Object): boolean,
canRemoveRecord(record: Object): boolean,
}
declare type Alaska$view$Service = {
id: string, // alaska-user
prefix: string,
api: boolean,
models: {
[modelName: string]: Alaska$view$Model
}
}
declare type Alaska$view$Record = {
_id: any,
[field: string]: any
}
declare type Alaska$view$RecordList = {
+key: string,
+fetching: boolean,
+filters: ?Object,
+search: ?string,
+sort: ?string,
+total: ?number,
+page: number,
+limit: ?number,
+totalPage: ?number,
+previous: ?number,
+next: ?number,
+error: ?string,
+results: ImmutableArray<Alaska$view$Record>
}
declare type Alaska$view$Menu = {
+id: string,
+label: string,
+icon: string,
+type: string,
+link: string,
+service: string,
+sort: number,
+activated: boolean
}
declare type Alaska$view$Settings = {
+user: Alaska$view$User,
+superMode: boolean,
+abilities: {
[ability: string]: true
},
+currencies: {
[cur: string]: {}
},
+services: {
[serviceId: string]: Alaska$view$Service
},
+models: {
[key: string]: Alaska$view$Model
},
+locale: string,
+locales: {
[serviceId: string]: {
[local: string]: {
[key: string]: string
}
}
},
+menu: Alaska$view$Menu[],
}
declare type Alaska$view$details = {
[modelKey: string]: {
[id: string]: Alaska$view$Record
}
}
declare type Alaska$view$lists = {
[key: string]: Alaska$view$RecordList
}
declare type Alaska$view$save = {
+error: null | { message: string, code?: string | number },
+fetching: boolean,
+key: string,
+_r: number,
+data?: ImmutableObject<Alaska$view$Record> | ImmutableArray<Alaska$view$Record>,
+res?: ImmutableObject<Alaska$view$Record> | ImmutableArray<Alaska$view$Record>
}
declare type Alaska$view$StoreState = {
+layout: 'full' | 'icon',
+login: ImmutableObject<Alaska$view$Login>,
+user: ImmutableObject<Alaska$view$User>,
+settings: Alaska$view$Settings,
+lists: ImmutableObject<Alaska$view$lists>,
+details: ImmutableObject<Alaska$view$details>,
+save: ImmutableObject<Alaska$view$save>
}
declare type Alaska$view$Views = {
[name: string]: React$Component<any, any>,
wrappers: {
[name: string]: Array<React$Component<any, any>>
},
routes: Array<{
component: Array<React$Component<any, any>>,
path: string,
}>,
navs: Array<React$Component<any, any>>
}
declare type Alaska$view$match<P> = {
isExact: boolean,
params: P,
path: string,
url: string,
}
declare type Alaska$view$location = {
pathname: string,
search: string,
hash: string,
state?: string,
}
declare type Alaska$view$history = {
length: number,
action: string,
location: Alaska$view$location,
push: (path: string, state?: string) => void,
replace: (path: string, state?: string) => void,
go: (n: number) => void,
goBack: () => void,
goForward: () => void,
block: (prompt: string) => void
};
declare interface Alaska$view$ReduxAction<T, P> {
type: T;
payload: P
}
declare module 'alaska-admin-view' {
declare export var api: Akita$Client;
declare export var store: Object;
declare export var App: Class<React$Component<Object, Object>>;
}
declare module 'alaska-admin-view/redux/details' {
declare export var LOAD_DETAILS: 'LOAD_DETAILS';
declare export var APPLY_DETAILS: 'APPLY_DETAILS';
declare export var BATCH_APPLY_DETAILS: 'BATCH_APPLY_DETAILS';
declare export var CLEAR_DETAILS: 'CLEAR_DETAILS';
declare export var BATCH_CLEAR_DETAILS: 'BATCH_CLEAR_DETAILS';
declare type clearDetailsPayload = { key: string, ids?: string[] };
declare export function clearDetails(item: clearDetailsPayload): Alaska$view$ReduxAction<'CLEAR_DETAILS', clearDetailsPayload>;
declare type batchClearDetailsPayload = clearDetailsPayload[];
declare export function batchClearDetails(list: batchClearDetailsPayload): Alaska$view$ReduxAction<'BATCH_CLEAR_DETAILS', batchClearDetailsPayload>;
declare type loadDetailsPayload = { service: string, model: string, key: string, id: string };
declare export function loadDetails(item: loadDetailsPayload): Alaska$view$ReduxAction<'LOAD_DETAILS', loadDetailsPayload>;
declare type applyDetailsPayload = { key: string, data: Object };
declare export function applyDetails(key: string, data: Object): Alaska$view$ReduxAction<'APPLY_DETAILS', applyDetailsPayload>;
declare type batchApplyDetailsPayload = Array<applyDetailsPayload>;
declare export function batchApplyDetails(list: batchApplyDetailsPayload): Alaska$view$ReduxAction<'BATCH_APPLY_DETAILS', batchApplyDetailsPayload>;
}
declare module 'alaska-admin-view/redux/lists' {
declare export var CLEAR_LIST: 'CLEAR_LIST';
declare export var LOAD_LIST: 'LOAD_LIST';
declare export var APPLY_LIST: 'APPLY_LIST';
declare type clearListPayload = { key?: string };
declare export function clearList(key?: string): Alaska$view$ReduxAction<'CLEAR_LIST', clearListPayload>;
declare type loadListPayload = {
service: string,
model: string,
key: string,
page?: number,
filters?: Object,
search?: string,
sort?: string
};
declare export function loadList(options: loadListPayload): Alaska$view$ReduxAction<'LOAD_LIST', loadListPayload>;
declare type applyListPayload = Alaska$view$RecordList & { key: string };
declare export function applyList(key: string, res: Alaska$view$RecordList): Alaska$view$ReduxAction<'LOAD_LIST', applyListPayload>;
}
declare module 'alaska-admin-view/redux/layout' {
declare export var APPLY_LAYOUT: 'APPLY_LAYOUT';
declare type LAYOUT = 'icon' | 'full' | 'hidden';
declare export function applyLayout(layout: LAYOUT): Alaska$view$ReduxAction<'APPLY_LAYOUT', LAYOUT>;
}
declare module 'alaska-admin-view/redux/save' {
declare export var SAVE: 'SAVE';
declare type saveOptions = {
service: string,
model: string,
key: string,
sort?: string,
_r: any
};
declare type savePayload = saveOptions & {
data: Object | Object[]
}
declare export function save(options: saveOptions, data: Object | Object[]): Alaska$view$ReduxAction<'SAVE', savePayload>;
}
declare module 'alaska-admin-view/views/Action' {
declare export type Props = {
editor?: boolean,
model: Alaska$view$Model,
action: Alaska$Model$action,
records?: ImmutableArray<Alaska$view$Record>,
selected?: ImmutableArray<Alaska$view$Record>,
disabled?: boolean,
record?: ImmutableObject<Alaska$view$Record>,
onClick?: Function,
link?: string,
refresh?: Function,
};
declare export default class Action extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/ActionList' {
declare export type Props = {
editor?: boolean,
disabled?: boolean,
model: Alaska$view$Model,
record?: ImmutableObject<Alaska$view$Record>,
records?: ImmutableArray<Alaska$view$Record>,
selected?: ImmutableArray<Alaska$view$Record>,
refresh?: Function,
items: Array<{
key: string,
onClick?: Function,
link?: string,
action: Alaska$Model$action
}>,
};
declare export default class ActionList extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/ColumnTool' {
declare export type Props = {
model: Alaska$view$Model,
columns: string[],
onChange: Function,
};
declare export default class ColumnTool extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/FilterTool' {
declare export type Props = {
model: Alaska$view$Model,
filters: Object,
onChange: Function,
};
declare export default class FilterTool extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/Copyright' {
declare export type Props = {
layout: string
};
declare export default class Copyright extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/DataTable' {
declare export type Props = {
model: Alaska$view$Model,
columns?: string[],
selected?: ImmutableArray<Alaska$view$Record>,
records: ImmutableArray<Alaska$view$Record>,
activated?: ImmutableObject<Alaska$view$Record>,
sort?: string,
onSort?: Function,
onActive?: Function,
onSelect?: Function,
onRemove?: Function,
canDrag?: boolean
};
declare export default class DataTable extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/DataTableRow' {
declare export type Props = {
columnList: Alaska$view$Field[],
model: Alaska$view$Model,
record: Object,
active?: boolean,
selected?: boolean,
onEdit: Function,
onActive?: Function,
onSelect?: Function | null,
onRemove?: Function,
};
declare export default class DataTableRow extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/Editor' {
declare export type Props = {
model: Alaska$view$Model,
recordId: string,
record: ImmutableObject<Alaska$view$Record>,
disabled?: boolean,
onChange: Function
};
declare export default class Editor extends React$Component<Props> {
fieldRefs: Object;
checkErrors(): Object;
}
}
declare module 'alaska-admin-view/views/FieldGroup' {
declare export type Props = {
path: string,
model: Alaska$view$Model,
record: ImmutableObject<Alaska$view$Record>,
isNew: boolean,
fields: Alaska$view$Field[],
title?: string,
errors: {},
onFieldChange: Function,
disabled?: boolean,
form?: boolean,
panel?: boolean,
style?: Alaska$style,
wrapper?: string, // 自定义Wrapper占位符
horizontal?: boolean,
ability?: string | Function,
super?: DependsQueryExpression,
hidden?: DependsQueryExpression,
depends?: DependsQueryExpression,
disabled?: DependsQueryExpression,
};
declare export default class FieldGroup extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/FilterEditor' {
declare export type Props = {
value: Object,
model: Alaska$view$Model,
onChange: Function
};
declare export default class FilterEditor extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/List' {
declare export type Props = {
model: Alaska$view$Model,
search?: string,
filters?: Object,
sort?: string,
columns?: string[],
selected?: ImmutableArray<Alaska$view$Record>,
activated?: ImmutableObject<Alaska$view$Record>,
onSort?: Function,
onSelect?: Function,
onActive?: Function,
onRemove?: Function,
};
declare export default class List extends React$Component<Props> {
refresh(): void;
loadMore(): void;
}
}
declare module 'alaska-admin-view/views/Loading' {
declare export type Props = {
className?: string,
text?: string,
};
declare export default class Loading extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/Node' {
declare export type Props = {
children: React$Node,
tag?: string | Class<React$Component<any>> | false,
id?: string,
wrapper?: string,
props?: Object,
state?: Object,
};
declare export default class Node extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/QuickEditor' {
declare export type Props = {
model: Alaska$view$Model,
record?: ImmutableObject<Alaska$view$Record>,
records: ImmutableArray<Alaska$view$Record>,
onCancel: Function,
onRefresh: Function
};
declare export default class QuickEditor extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/Relationship' {
declare export type Props = {
title?: string,
service: string,
model: string,
path: string,
from: string,
filters?: Object,
};
declare export default class Relationship extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/TooltipWrapper' {
declare export type Props = {
children: React$Node,
tooltip: string,
placement?: string
};
declare export default class TooltipWrapper extends React$Component<Props> {
}
}
declare module 'alaska-admin-view/views/TopToolbar' {
declare export type Props = {
children: React$Node,
tools?: React$Node
};
declare export default class TopToolbar extends React$Component<Props> {
}
}
| 25.057756 | 150 | 0.688179 |
83c9797cd48305d003da1d7f250bcff09866fddb | 51 | js | JavaScript | packages/bundler-utils/compiled/babel/preset-typescript.js | CJY0208/umi-next | 3d63dd03caff1c716f26ffc8dcc8504ff0e10409 | [
"MIT"
] | 474 | 2019-11-21T07:32:25.000Z | 2022-03-31T10:08:35.000Z | packages/bundler-utils/compiled/babel/preset-typescript.js | CJY0208/umi-next | 3d63dd03caff1c716f26ffc8dcc8504ff0e10409 | [
"MIT"
] | 338 | 2019-12-14T12:29:13.000Z | 2022-03-31T08:53:37.000Z | packages/bundler-utils/compiled/babel/preset-typescript.js | CJY0208/umi-next | 3d63dd03caff1c716f26ffc8dcc8504ff0e10409 | [
"MIT"
] | 88 | 2019-12-19T02:43:58.000Z | 2022-03-30T09:15:38.000Z | module.exports = require('./').presetTypescript();
| 25.5 | 50 | 0.705882 |
83c98254c42e3a66f768573960c9977cf264c6db | 18 | js | JavaScript | test/js/init2.js | keleko34/KBatchLoader | b859b894bf640a3bacd83827d3cffca4cbfd307a | [
"MIT"
] | null | null | null | test/js/init2.js | keleko34/KBatchLoader | b859b894bf640a3bacd83827d3cffca4cbfd307a | [
"MIT"
] | null | null | null | test/js/init2.js | keleko34/KBatchLoader | b859b894bf640a3bacd83827d3cffca4cbfd307a | [
"MIT"
] | null | null | null | console.log("2");
| 9 | 17 | 0.611111 |
83c9eca1a64f0c667c8dcdbd7423c1e556bb9c39 | 2,607 | js | JavaScript | build/translations/en-gb.js | ajboni/ckeditor5-build-classic | f44876f042026ef3176f329694d01c308e9dfb96 | [
"MIT"
] | null | null | null | build/translations/en-gb.js | ajboni/ckeditor5-build-classic | f44876f042026ef3176f329694d01c308e9dfb96 | [
"MIT"
] | null | null | null | build/translations/en-gb.js | ajboni/ckeditor5-build-classic | f44876f042026ef3176f329694d01c308e9dfb96 | [
"MIT"
] | null | null | null | (function(d){d['en-gb']=Object.assign(d['en-gb']||{},{a:"Cannot upload file:",b:"Type your title",c:"Type or paste your content here.",d:"Image toolbar",e:"Table toolbar",f:"Words: %0",g:"Characters: %0",h:"Bold",i:"Block quote",j:"Italic",k:"Upload in progress",l:"Insert image or file",m:"Choose heading",n:"Heading",o:"Image widget",p:"Enter image caption",q:"Full size image",r:"Side image",s:"Left aligned image",t:"Centred image",u:"Right aligned image",v:"Insert image",w:"Upload failed",x:"Increase indent",y:"Decrease indent",z:"Link",aa:"Numbered List",ab:"Bulleted List",ac:"Media widget",ad:"Insert media",ae:"The URL must not be empty.",af:"This media URL is not supported.",ag:"To-do List",ah:"Widget toolbar",ai:"Horizontal line",aj:"Align left",ak:"Align right",al:"Align center",am:"Justify",an:"Text alignment",ao:"Text alignment toolbar",ap:"Yellow marker",aq:"Green marker",ar:"Pink marker",as:"Blue marker",at:"Red pen",au:"Green pen",av:"Remove highlight",aw:"Highlight",ax:"Text highlight toolbar",ay:"Insert code block",az:"Insert table",ba:"Header column",bb:"Insert column left",bc:"Insert column right",bd:"Delete column",be:"Column",bf:"Header row",bg:"Insert row below",bh:"Insert row above",bi:"Delete row",bj:"Row",bk:"Merge cell up",bl:"Merge cell right",bm:"Merge cell down",bn:"Merge cell left",bo:"Split cell vertically",bp:"Split cell horizontally",bq:"Merge cells",br:"Could not obtain resized image URL.",bs:"Selecting resized image failed",bt:"Could not insert image at the current position.",bu:"Inserting image failed",bv:"Change image text alternative",bw:"Rich Text Editor",bx:"Save",by:"Cancel",bz:"Paste the media URL in the input.",ca:"Tip: Paste the URL into the content to embed faster.",cb:"Media URL",cc:"Dropdown toolbar",cd:"Unlink",ce:"Edit link",cf:"Open link in new tab",cg:"This link has no URL",ch:"Link URL",ci:"Open in a new tab",cj:"Downloadable",ck:"%0 of %1",cl:"Previous",cm:"Next",cn:"Font Background Colour",co:"Font Colour",cp:"Font Family",cq:"Default",cr:"Font Size",cs:"Tiny",ct:"Small",cu:"Big",cv:"Huge",cw:"Text alternative",cx:"Plain text",cy:"Black",cz:"Dim grey",da:"Grey",db:"Light grey",dc:"White",dd:"Red",de:"Orange",df:"Yellow",dg:"Light green",dh:"Green",di:"Aquamarine",dj:"Turquoise",dk:"Light blue",dl:"Blue",dm:"Purple",dn:"Remove colour",do:"Document colours",dp:"Editor toolbar",dq:"Show more items",dr:"Undo",ds:"Redo",dt:"Paragraph",du:"Heading 1",dv:"Heading 2",dw:"Heading 3",dx:"Heading 4",dy:"Heading 5",dz:"Heading 6",ea:"Rich Text Editor, %0"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})); | 2,607 | 2,607 | 0.710395 |
83cae63fa81e4a09d16342d663d196694a50ecfb | 56,897 | js | JavaScript | docker/alpine/kolibri/core/static/kolibri.core.default_frontend/kolibri.core.default_frontend-vendors~intl-0.14.3.js | sanmoy/kolibri-azure | 9becf1c167225e6cf20f25b379f3d7f27486e56d | [
"MIT"
] | 1 | 2020-10-22T05:54:52.000Z | 2020-10-22T05:54:52.000Z | docker/alpine/kolibri/core/static/kolibri.core.default_frontend/kolibri.core.default_frontend-vendors~intl-0.14.3.js | sanmoy/kolibri-azure | 9becf1c167225e6cf20f25b379f3d7f27486e56d | [
"MIT"
] | null | null | null | docker/alpine/kolibri/core/static/kolibri.core.default_frontend/kolibri.core.default_frontend-vendors~intl-0.14.3.js | sanmoy/kolibri-azure | 9becf1c167225e6cf20f25b379f3d7f27486e56d | [
"MIT"
] | null | null | null | (window["webpackJsonp__kolibricore.default_frontend"]=window["webpackJsonp__kolibricore.default_frontend"]||[]).push([[3],{1236:function(module,exports,__webpack_require__){"use strict";(function(global){var REACT_ELEMENT_TYPE,_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj},jsx=(REACT_ELEMENT_TYPE="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,function(type,props,key,children){var arguments$1=arguments,defaultProps=type&&type.defaultProps,childrenLength=arguments.length-3;if(props||0===childrenLength||(props={}),props&&defaultProps)for(var propName in defaultProps)void 0===props[propName]&&(props[propName]=defaultProps[propName]);else props||(props=defaultProps||{});if(1===childrenLength)props.children=children;else if(childrenLength>1){for(var childArray=Array(childrenLength),i=0;i<childrenLength;i++)childArray[i]=arguments$1[i+3];props.children=childArray}return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:void 0===key?null:""+key,ref:null,props:props,_owner:null}}),createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),defineProperty$1=function(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj},_extends=Object.assign||function(target){for(var arguments$1=arguments,i=1;i<arguments.length;i++){var source=arguments$1[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},selfGlobal=void 0===global?self:global,slicedToArray=function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return function(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")},babelHelpers$1=Object.freeze({jsx:jsx,asyncToGenerator:function(fn){return function(){var gen=fn.apply(this,arguments);return new Promise((function(resolve,reject){return function step(key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}if(!info.done)return Promise.resolve(value).then((function(value){return step("next",value)}),(function(err){return step("throw",err)}));resolve(value)}("next")}))}},classCallCheck:function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")},createClass:createClass,defineEnumerableProperties:function(obj,descs){for(var key in descs){var desc=descs[key];desc.configurable=desc.enumerable=!0,"value"in desc&&(desc.writable=!0),Object.defineProperty(obj,key,desc)}return obj},defaults:function(obj,defaults){for(var keys=Object.getOwnPropertyNames(defaults),i=0;i<keys.length;i++){var key=keys[i],value=Object.getOwnPropertyDescriptor(defaults,key);value&&value.configurable&&void 0===obj[key]&&Object.defineProperty(obj,key,value)}return obj},defineProperty:defineProperty$1,get:function get(object,property,receiver){null===object&&(object=Function.prototype);var desc=Object.getOwnPropertyDescriptor(object,property);if(void 0===desc){var parent=Object.getPrototypeOf(object);return null===parent?void 0:get(parent,property,receiver)}if("value"in desc)return desc.value;var getter=desc.get;return void 0!==getter?getter.call(receiver):void 0},inherits:function(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)},interopRequireDefault:function(obj){return obj&&obj.__esModule?obj:{default:obj}},interopRequireWildcard:function(obj){if(obj&&obj.__esModule)return obj;var newObj={};if(null!=obj)for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&(newObj[key]=obj[key]);return newObj.default=obj,newObj},newArrowCheck:function(innerThis,boundThis){if(innerThis!==boundThis)throw new TypeError("Cannot instantiate an arrow function")},objectDestructuringEmpty:function(obj){if(null==obj)throw new TypeError("Cannot destructure undefined")},objectWithoutProperties:function(obj,keys){var target={};for(var i in obj)keys.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(obj,i)&&(target[i]=obj[i]);return target},possibleConstructorReturn:function(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call},selfGlobal:selfGlobal,set:function set(object,property,value,receiver){var desc=Object.getOwnPropertyDescriptor(object,property);if(void 0===desc){var parent=Object.getPrototypeOf(object);null!==parent&&set(parent,property,value,receiver)}else if("value"in desc&&desc.writable)desc.value=value;else{var setter=desc.set;void 0!==setter&&setter.call(receiver,value)}return value},slicedToArray:slicedToArray,slicedToArrayLoose:function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr)){for(var _step,_arr=[],_iterator=arr[Symbol.iterator]();!(_step=_iterator.next()).done&&(_arr.push(_step.value),!i||_arr.length!==i););return _arr}throw new TypeError("Invalid attempt to destructure non-iterable instance")},taggedTemplateLiteral:function(strings,raw){return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))},taggedTemplateLiteralLoose:function(strings,raw){return strings.raw=raw,strings},temporalRef:function(val,name,undef){if(val===undef)throw new ReferenceError(name+" is not defined - temporal dead zone");return val},temporalUndefined:{},toArray:function(arr){return Array.isArray(arr)?arr:Array.from(arr)},toConsumableArray:function(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)},typeof:_typeof,extends:_extends,instanceof:function(left,right){return null!=right&&"undefined"!=typeof Symbol&&right[Symbol.hasInstance]?right[Symbol.hasInstance](left):left instanceof right}}),realDefineProp=function(){var sentinel=function(){};try{return Object.defineProperty(sentinel,"a",{get:function(){return 1}}),Object.defineProperty(sentinel,"prototype",{writable:!1}),1===sentinel.a&&sentinel.prototype instanceof Object}catch(e){return!1}}(),es3=!realDefineProp&&!Object.prototype.__defineGetter__,hop=Object.prototype.hasOwnProperty,defineProperty=realDefineProp?Object.defineProperty:function(obj,name,desc){"get"in desc&&obj.__defineGetter__?obj.__defineGetter__(name,desc.get):hop.call(obj,name)&&!("value"in desc)||(obj[name]=desc.value)},arrIndexOf=Array.prototype.indexOf||function(search){var t=this;if(!t.length)return-1;for(var i=arguments[1]||0,max=t.length;i<max;i++)if(t[i]===search)return i;return-1},objCreate=Object.create||function(proto,props){var obj;function F(){}for(var k in F.prototype=proto,obj=new F,props)hop.call(props,k)&&defineProperty(obj,k,props[k]);return obj},arrSlice=Array.prototype.slice,arrConcat=Array.prototype.concat,arrPush=Array.prototype.push,arrJoin=Array.prototype.join,arrShift=Array.prototype.shift,fnBind=Function.prototype.bind||function(thisObj){var fn=this,args=arrSlice.call(arguments,1);return fn.length,function(){return fn.apply(thisObj,arrConcat.call(args,arrSlice.call(arguments)))}},internals=objCreate(null),secret=Math.random();function Record(obj){for(var k in obj)(obj instanceof Record||hop.call(obj,k))&&defineProperty(this,k,{value:obj[k],enumerable:!0,writable:!0,configurable:!0})}function List(){defineProperty(this,"length",{writable:!0,value:0}),arguments.length&&arrPush.apply(this,arrSlice.call(arguments))}function createRegExpRestore(){if(internals.disableRegExpRestore)return function(){};for(var regExpCache={lastMatch:RegExp.lastMatch||"",leftContext:RegExp.leftContext,multiline:RegExp.multiline,input:RegExp.input},has=!1,i=1;i<=9;i++)has=(regExpCache["$"+i]=RegExp["$"+i])||has;return function(){var esc=/[.?*+^$[\]\\(){}|-]/g,lm=regExpCache.lastMatch.replace(esc,"\\$&"),reg=new List;if(has)for(var _i=1;_i<=9;_i++){var m=regExpCache["$"+_i];m?(m=m.replace(esc,"\\$&"),lm=lm.replace(m,"("+m+")")):lm="()"+lm,arrPush.call(reg,lm.slice(0,lm.indexOf("(")+1)),lm=lm.slice(lm.indexOf("(")+1)}var exprStr=arrJoin.call(reg,"")+lm;exprStr=exprStr.replace(/(\\\(|\\\)|[^()])+/g,(function(match){return"[\\s\\S]{"+match.replace("\\","").length+"}"}));var expr=new RegExp(exprStr,regExpCache.multiline?"gm":"g");expr.lastIndex=regExpCache.leftContext.length,expr.exec(regExpCache.input)}}function toObject(arg){if(null===arg)throw new TypeError("Cannot convert null or undefined to object");return"object"===(void 0===arg?"undefined":babelHelpers$1.typeof(arg))?arg:Object(arg)}function toNumber(arg){return"number"==typeof arg?arg:Number(arg)}function toLength(arg){var len=function(arg){var number=toNumber(arg);return isNaN(number)?0:0===number||-0===number||number===1/0||number===-1/0?number:number<0?-1*Math.floor(Math.abs(number)):Math.floor(Math.abs(number))}(arg);return len<=0?0:len===1/0?Math.pow(2,53)-1:Math.min(len,Math.pow(2,53)-1)}function getInternalProperties(obj){return hop.call(obj,"__getInternalProperties")?obj.__getInternalProperties(secret):objCreate(null)}Record.prototype=objCreate(null),List.prototype=objCreate(null);var variant="(?:[a-z0-9]{5,8}|\\d[a-z0-9]{3})",extension="[0-9a-wy-z](?:-[a-z0-9]{2,8})+",expBCP47Syntax=RegExp("^(?:(?:[a-z]{2,3}(?:-[a-z]{3}(?:-[a-z]{3}){0,2})?|[a-z]{4}|[a-z]{5,8})(?:-[a-z]{4})?(?:-(?:[a-z]{2}|\\d{3}))?(?:-(?:[a-z0-9]{5,8}|\\d[a-z0-9]{3}))*(?:-[0-9a-wy-z](?:-[a-z0-9]{2,8})+)*(?:-x(?:-[a-z0-9]{1,8})+)?|x(?:-[a-z0-9]{1,8})+|(?:(?:en-GB-oed|i-(?:ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu)|sgn-(?:BE-FR|BE-NL|CH-DE))|(?:art-lojban|cel-gaulish|no-bok|no-nyn|zh-(?:guoyu|hakka|min|min-nan|xiang))))$","i"),expVariantDupes=RegExp("^(?!x).*?-("+variant+")-(?:\\w{4,8}-(?!x-))*\\1\\b","i"),expSingletonDupes=RegExp("^(?!x).*?-([0-9a-wy-z])-(?:\\w+-(?!x-))*\\1\\b","i"),expExtSequences=RegExp("-"+extension,"ig"),defaultLocale=void 0;var redundantTags={tags:{"art-lojban":"jbo","i-ami":"ami","i-bnn":"bnn","i-hak":"hak","i-klingon":"tlh","i-lux":"lb","i-navajo":"nv","i-pwn":"pwn","i-tao":"tao","i-tay":"tay","i-tsu":"tsu","no-bok":"nb","no-nyn":"nn","sgn-BE-FR":"sfb","sgn-BE-NL":"vgt","sgn-CH-DE":"sgg","zh-guoyu":"cmn","zh-hakka":"hak","zh-min-nan":"nan","zh-xiang":"hsn","sgn-BR":"bzs","sgn-CO":"csn","sgn-DE":"gsg","sgn-DK":"dsl","sgn-ES":"ssp","sgn-FR":"fsl","sgn-GB":"bfi","sgn-GR":"gss","sgn-IE":"isg","sgn-IT":"ise","sgn-JP":"jsl","sgn-MX":"mfs","sgn-NI":"ncs","sgn-NL":"dse","sgn-NO":"nsl","sgn-PT":"psr","sgn-SE":"swl","sgn-US":"ase","sgn-ZA":"sfs","zh-cmn":"cmn","zh-cmn-Hans":"cmn-Hans","zh-cmn-Hant":"cmn-Hant","zh-gan":"gan","zh-wuu":"wuu","zh-yue":"yue"},subtags:{BU:"MM",DD:"DE",FX:"FR",TP:"TL",YD:"YE",ZR:"CD",heploc:"alalc97",in:"id",iw:"he",ji:"yi",jw:"jv",mo:"ro",ayx:"nun",bjd:"drl",ccq:"rki",cjr:"mom",cka:"cmr",cmk:"xch",drh:"khk",drw:"prs",gav:"dev",hrr:"jal",ibi:"opa",kgh:"kml",lcq:"ppr",mst:"mry",myt:"mry",sca:"hle",tie:"ras",tkk:"twm",tlw:"weo",tnf:"prs",ybd:"rki",yma:"lrr"},extLang:{aao:["aao","ar"],abh:["abh","ar"],abv:["abv","ar"],acm:["acm","ar"],acq:["acq","ar"],acw:["acw","ar"],acx:["acx","ar"],acy:["acy","ar"],adf:["adf","ar"],ads:["ads","sgn"],aeb:["aeb","ar"],aec:["aec","ar"],aed:["aed","sgn"],aen:["aen","sgn"],afb:["afb","ar"],afg:["afg","sgn"],ajp:["ajp","ar"],apc:["apc","ar"],apd:["apd","ar"],arb:["arb","ar"],arq:["arq","ar"],ars:["ars","ar"],ary:["ary","ar"],arz:["arz","ar"],ase:["ase","sgn"],asf:["asf","sgn"],asp:["asp","sgn"],asq:["asq","sgn"],asw:["asw","sgn"],auz:["auz","ar"],avl:["avl","ar"],ayh:["ayh","ar"],ayl:["ayl","ar"],ayn:["ayn","ar"],ayp:["ayp","ar"],bbz:["bbz","ar"],bfi:["bfi","sgn"],bfk:["bfk","sgn"],bjn:["bjn","ms"],bog:["bog","sgn"],bqn:["bqn","sgn"],bqy:["bqy","sgn"],btj:["btj","ms"],bve:["bve","ms"],bvl:["bvl","sgn"],bvu:["bvu","ms"],bzs:["bzs","sgn"],cdo:["cdo","zh"],cds:["cds","sgn"],cjy:["cjy","zh"],cmn:["cmn","zh"],coa:["coa","ms"],cpx:["cpx","zh"],csc:["csc","sgn"],csd:["csd","sgn"],cse:["cse","sgn"],csf:["csf","sgn"],csg:["csg","sgn"],csl:["csl","sgn"],csn:["csn","sgn"],csq:["csq","sgn"],csr:["csr","sgn"],czh:["czh","zh"],czo:["czo","zh"],doq:["doq","sgn"],dse:["dse","sgn"],dsl:["dsl","sgn"],dup:["dup","ms"],ecs:["ecs","sgn"],esl:["esl","sgn"],esn:["esn","sgn"],eso:["eso","sgn"],eth:["eth","sgn"],fcs:["fcs","sgn"],fse:["fse","sgn"],fsl:["fsl","sgn"],fss:["fss","sgn"],gan:["gan","zh"],gds:["gds","sgn"],gom:["gom","kok"],gse:["gse","sgn"],gsg:["gsg","sgn"],gsm:["gsm","sgn"],gss:["gss","sgn"],gus:["gus","sgn"],hab:["hab","sgn"],haf:["haf","sgn"],hak:["hak","zh"],hds:["hds","sgn"],hji:["hji","ms"],hks:["hks","sgn"],hos:["hos","sgn"],hps:["hps","sgn"],hsh:["hsh","sgn"],hsl:["hsl","sgn"],hsn:["hsn","zh"],icl:["icl","sgn"],ils:["ils","sgn"],inl:["inl","sgn"],ins:["ins","sgn"],ise:["ise","sgn"],isg:["isg","sgn"],isr:["isr","sgn"],jak:["jak","ms"],jax:["jax","ms"],jcs:["jcs","sgn"],jhs:["jhs","sgn"],jls:["jls","sgn"],jos:["jos","sgn"],jsl:["jsl","sgn"],jus:["jus","sgn"],kgi:["kgi","sgn"],knn:["knn","kok"],kvb:["kvb","ms"],kvk:["kvk","sgn"],kvr:["kvr","ms"],kxd:["kxd","ms"],lbs:["lbs","sgn"],lce:["lce","ms"],lcf:["lcf","ms"],liw:["liw","ms"],lls:["lls","sgn"],lsg:["lsg","sgn"],lsl:["lsl","sgn"],lso:["lso","sgn"],lsp:["lsp","sgn"],lst:["lst","sgn"],lsy:["lsy","sgn"],ltg:["ltg","lv"],lvs:["lvs","lv"],lzh:["lzh","zh"],max:["max","ms"],mdl:["mdl","sgn"],meo:["meo","ms"],mfa:["mfa","ms"],mfb:["mfb","ms"],mfs:["mfs","sgn"],min:["min","ms"],mnp:["mnp","zh"],mqg:["mqg","ms"],mre:["mre","sgn"],msd:["msd","sgn"],msi:["msi","ms"],msr:["msr","sgn"],mui:["mui","ms"],mzc:["mzc","sgn"],mzg:["mzg","sgn"],mzy:["mzy","sgn"],nan:["nan","zh"],nbs:["nbs","sgn"],ncs:["ncs","sgn"],nsi:["nsi","sgn"],nsl:["nsl","sgn"],nsp:["nsp","sgn"],nsr:["nsr","sgn"],nzs:["nzs","sgn"],okl:["okl","sgn"],orn:["orn","ms"],ors:["ors","ms"],pel:["pel","ms"],pga:["pga","ar"],pks:["pks","sgn"],prl:["prl","sgn"],prz:["prz","sgn"],psc:["psc","sgn"],psd:["psd","sgn"],pse:["pse","ms"],psg:["psg","sgn"],psl:["psl","sgn"],pso:["pso","sgn"],psp:["psp","sgn"],psr:["psr","sgn"],pys:["pys","sgn"],rms:["rms","sgn"],rsi:["rsi","sgn"],rsl:["rsl","sgn"],sdl:["sdl","sgn"],sfb:["sfb","sgn"],sfs:["sfs","sgn"],sgg:["sgg","sgn"],sgx:["sgx","sgn"],shu:["shu","ar"],slf:["slf","sgn"],sls:["sls","sgn"],sqk:["sqk","sgn"],sqs:["sqs","sgn"],ssh:["ssh","ar"],ssp:["ssp","sgn"],ssr:["ssr","sgn"],svk:["svk","sgn"],swc:["swc","sw"],swh:["swh","sw"],swl:["swl","sgn"],syy:["syy","sgn"],tmw:["tmw","ms"],tse:["tse","sgn"],tsm:["tsm","sgn"],tsq:["tsq","sgn"],tss:["tss","sgn"],tsy:["tsy","sgn"],tza:["tza","sgn"],ugn:["ugn","sgn"],ugy:["ugy","sgn"],ukl:["ukl","sgn"],uks:["uks","sgn"],urk:["urk","ms"],uzn:["uzn","uz"],uzs:["uzs","uz"],vgt:["vgt","sgn"],vkk:["vkk","ms"],vkt:["vkt","ms"],vsi:["vsi","sgn"],vsl:["vsl","sgn"],vsv:["vsv","sgn"],wuu:["wuu","zh"],xki:["xki","sgn"],xml:["xml","sgn"],xmm:["xmm","ms"],xms:["xms","sgn"],yds:["yds","sgn"],ysl:["ysl","sgn"],yue:["yue","zh"],zib:["zib","sgn"],zlm:["zlm","ms"],zmi:["zmi","ms"],zsl:["zsl","sgn"],zsm:["zsm","ms"]}};function toLatinUpperCase(str){for(var i=str.length;i--;){var ch=str.charAt(i);ch>="a"&&ch<="z"&&(str=str.slice(0,i)+ch.toUpperCase()+str.slice(i+1))}return str}function IsStructurallyValidLanguageTag(locale){return!!expBCP47Syntax.test(locale)&&(!expVariantDupes.test(locale)&&!expSingletonDupes.test(locale))}function CanonicalizeLanguageTag(locale){for(var match=void 0,parts=void 0,i=1,max=(parts=(locale=locale.toLowerCase()).split("-")).length;i<max;i++)if(2===parts[i].length)parts[i]=parts[i].toUpperCase();else if(4===parts[i].length)parts[i]=parts[i].charAt(0).toUpperCase()+parts[i].slice(1);else if(1===parts[i].length&&"x"!==parts[i])break;(match=(locale=arrJoin.call(parts,"-")).match(expExtSequences))&&match.length>1&&(match.sort(),locale=locale.replace(RegExp("(?:"+expExtSequences.source+")+","i"),arrJoin.call(match,""))),hop.call(redundantTags.tags,locale)&&(locale=redundantTags.tags[locale]);for(var _i=1,_max=(parts=locale.split("-")).length;_i<_max;_i++)hop.call(redundantTags.subtags,parts[_i])?parts[_i]=redundantTags.subtags[parts[_i]]:hop.call(redundantTags.extLang,parts[_i])&&(parts[_i]=redundantTags.extLang[parts[_i]][0],1===_i&&redundantTags.extLang[parts[1]][1]===parts[0]&&(parts=arrSlice.call(parts,_i++),_max-=1));return arrJoin.call(parts,"-")}var expCurrencyCode=/^[A-Z]{3}$/;var expUnicodeExSeq=/-u(?:-[0-9a-z]{2,8})+/gi;function CanonicalizeLocaleList(locales){if(void 0===locales)return new List;for(var seen=new List,O=toObject(locales="string"==typeof locales?[locales]:locales),len=toLength(O.length),k=0;k<len;){var Pk=String(k);if(Pk in O){var kValue=O[Pk];if(null===kValue||"string"!=typeof kValue&&"object"!==(void 0===kValue?"undefined":babelHelpers$1.typeof(kValue)))throw new TypeError("String or Object type expected");var tag=String(kValue);if(!IsStructurallyValidLanguageTag(tag))throw new RangeError("'"+tag+"' is not a structurally valid language tag");tag=CanonicalizeLanguageTag(tag),-1===arrIndexOf.call(seen,tag)&&arrPush.call(seen,tag)}k++}return seen}function BestAvailableLocale(availableLocales,locale){for(var candidate=locale;candidate;){if(arrIndexOf.call(availableLocales,candidate)>-1)return candidate;var pos=candidate.lastIndexOf("-");if(pos<0)return;pos>=2&&"-"===candidate.charAt(pos-2)&&(pos-=2),candidate=candidate.substring(0,pos)}}function LookupMatcher(availableLocales,requestedLocales){for(var i=0,len=requestedLocales.length,availableLocale=void 0,locale=void 0,noExtensionsLocale=void 0;i<len&&!availableLocale;)locale=requestedLocales[i],availableLocale=BestAvailableLocale(availableLocales,noExtensionsLocale=String(locale).replace(expUnicodeExSeq,"")),i++;var result=new Record;if(void 0!==availableLocale){if(result["[[locale]]"]=availableLocale,String(locale)!==String(noExtensionsLocale)){var extension=locale.match(expUnicodeExSeq)[0],extensionIndex=locale.indexOf("-u-");result["[[extension]]"]=extension,result["[[extensionIndex]]"]=extensionIndex}}else result["[[locale]]"]=defaultLocale;return result}function ResolveLocale(availableLocales,requestedLocales,options,relevantExtensionKeys,localeData){if(0===availableLocales.length)throw new ReferenceError("No locale data has been provided for this object yet.");var r=void 0,foundLocale=(r="lookup"===options["[[localeMatcher]]"]?LookupMatcher(availableLocales,requestedLocales):function(availableLocales,requestedLocales){return LookupMatcher(availableLocales,requestedLocales)}(availableLocales,requestedLocales))["[[locale]]"],extensionSubtags=void 0,extensionSubtagsLength=void 0;if(hop.call(r,"[[extension]]")){var extension=r["[[extension]]"];extensionSubtagsLength=(extensionSubtags=String.prototype.split.call(extension,"-")).length}var result=new Record;result["[[dataLocale]]"]=foundLocale;for(var supportedExtension="-u",i=0,len=relevantExtensionKeys.length;i<len;){var key=relevantExtensionKeys[i],keyLocaleData=localeData[foundLocale][key],value=keyLocaleData[0],supportedExtensionAddition="",indexOf=arrIndexOf;if(void 0!==extensionSubtags){var keyPos=indexOf.call(extensionSubtags,key);if(-1!==keyPos)if(keyPos+1<extensionSubtagsLength&&extensionSubtags[keyPos+1].length>2){var requestedValue=extensionSubtags[keyPos+1];-1!==indexOf.call(keyLocaleData,requestedValue)&&(supportedExtensionAddition="-"+key+"-"+(value=requestedValue))}else{-1!==indexOf(keyLocaleData,"true")&&(value="true")}}if(hop.call(options,"[["+key+"]]")){var optionsValue=options["[["+key+"]]"];-1!==indexOf.call(keyLocaleData,optionsValue)&&optionsValue!==value&&(value=optionsValue,supportedExtensionAddition="")}result["[["+key+"]]"]=value,supportedExtension+=supportedExtensionAddition,i++}if(supportedExtension.length>2){var privateIndex=foundLocale.indexOf("-x-");if(-1===privateIndex)foundLocale+=supportedExtension;else{var preExtension=foundLocale.substring(0,privateIndex),postExtension=foundLocale.substring(privateIndex);foundLocale=preExtension+supportedExtension+postExtension}foundLocale=CanonicalizeLanguageTag(foundLocale)}return result["[[locale]]"]=foundLocale,result}function LookupSupportedLocales(availableLocales,requestedLocales){for(var len=requestedLocales.length,subset=new List,k=0;k<len;){var locale=requestedLocales[k];void 0!==BestAvailableLocale(availableLocales,String(locale).replace(expUnicodeExSeq,""))&&arrPush.call(subset,locale),k++}return arrSlice.call(subset)}function SupportedLocales(availableLocales,requestedLocales,options){var matcher=void 0,subset=void 0;if(void 0!==options&&void 0!==(matcher=(options=new Record(toObject(options))).localeMatcher)&&"lookup"!==(matcher=String(matcher))&&"best fit"!==matcher)throw new RangeError('matcher should be "lookup" or "best fit"');for(var P in subset=void 0===matcher||"best fit"===matcher?function(availableLocales,requestedLocales){return LookupSupportedLocales(availableLocales,requestedLocales)}(availableLocales,requestedLocales):LookupSupportedLocales(availableLocales,requestedLocales))hop.call(subset,P)&&defineProperty(subset,P,{writable:!1,configurable:!1,value:subset[P]});return defineProperty(subset,"length",{writable:!1}),subset}function GetOption(options,property,type,values,fallback){var value=options[property];if(void 0!==value){if(value="boolean"===type?Boolean(value):"string"===type?String(value):value,void 0!==values&&-1===arrIndexOf.call(values,value))throw new RangeError("'"+value+"' is not an allowed value for `"+property+"`");return value}return fallback}function GetNumberOption(options,property,minimum,maximum,fallback){var value=options[property];if(void 0!==value){if(value=Number(value),isNaN(value)||value<minimum||value>maximum)throw new RangeError("Value is not a number or outside accepted range");return Math.floor(value)}return fallback}var Intl={};Object.defineProperty(Intl,"getCanonicalLocales",{enumerable:!1,configurable:!0,writable:!0,value:function(locales){for(var ll=CanonicalizeLocaleList(locales),result=[],len=ll.length,k=0;k<len;)result[k]=ll[k],k++;return result}});var currencyMinorUnits={BHD:3,BYR:0,XOF:0,BIF:0,XAF:0,CLF:4,CLP:0,KMF:0,DJF:0,XPF:0,GNF:0,ISK:0,IQD:3,JPY:0,JOD:3,KRW:0,KWD:3,LYD:3,OMR:3,PYG:0,RWF:0,TND:3,UGX:0,UYI:0,VUV:0,VND:0};function NumberFormatConstructor(){var locales=arguments[0],options=arguments[1];return this&&this!==Intl?InitializeNumberFormat(toObject(this),locales,options):new Intl.NumberFormat(locales,options)}function InitializeNumberFormat(numberFormat,locales,options){var internal=getInternalProperties(numberFormat),regexpRestore=createRegExpRestore();if(!0===internal["[[initializedIntlObject]]"])throw new TypeError("`this` object has already been initialized as an Intl object");defineProperty(numberFormat,"__getInternalProperties",{value:function(){if(arguments[0]===secret)return internal}}),internal["[[initializedIntlObject]]"]=!0;var requestedLocales=CanonicalizeLocaleList(locales);options=void 0===options?{}:toObject(options);var opt=new Record,matcher=GetOption(options,"localeMatcher","string",new List("lookup","best fit"),"best fit");opt["[[localeMatcher]]"]=matcher;var localeData=internals.NumberFormat["[[localeData]]"],r=ResolveLocale(internals.NumberFormat["[[availableLocales]]"],requestedLocales,opt,internals.NumberFormat["[[relevantExtensionKeys]]"],localeData);internal["[[locale]]"]=r["[[locale]]"],internal["[[numberingSystem]]"]=r["[[nu]]"],internal["[[dataLocale]]"]=r["[[dataLocale]]"];var dataLocale=r["[[dataLocale]]"],s=GetOption(options,"style","string",new List("decimal","percent","currency"),"decimal");internal["[[style]]"]=s;var normalized,c=GetOption(options,"currency","string");if(void 0!==c&&(normalized=toLatinUpperCase(String(c)),!1===expCurrencyCode.test(normalized)))throw new RangeError("'"+c+"' is not a valid currency code");if("currency"===s&&void 0===c)throw new TypeError("Currency code is required when style is currency");var cDigits=void 0;"currency"===s&&(c=c.toUpperCase(),internal["[[currency]]"]=c,cDigits=function(currency){return void 0!==currencyMinorUnits[currency]?currencyMinorUnits[currency]:2}(c));var cd=GetOption(options,"currencyDisplay","string",new List("code","symbol","name"),"symbol");"currency"===s&&(internal["[[currencyDisplay]]"]=cd);var mnid=GetNumberOption(options,"minimumIntegerDigits",1,21,1);internal["[[minimumIntegerDigits]]"]=mnid;var mnfd=GetNumberOption(options,"minimumFractionDigits",0,20,"currency"===s?cDigits:0);internal["[[minimumFractionDigits]]"]=mnfd;var mxfd=GetNumberOption(options,"maximumFractionDigits",mnfd,20,"currency"===s?Math.max(mnfd,cDigits):"percent"===s?Math.max(mnfd,0):Math.max(mnfd,3));internal["[[maximumFractionDigits]]"]=mxfd;var mnsd=options.minimumSignificantDigits,mxsd=options.maximumSignificantDigits;void 0===mnsd&&void 0===mxsd||(mnsd=GetNumberOption(options,"minimumSignificantDigits",1,21,1),mxsd=GetNumberOption(options,"maximumSignificantDigits",mnsd,21,21),internal["[[minimumSignificantDigits]]"]=mnsd,internal["[[maximumSignificantDigits]]"]=mxsd);var g=GetOption(options,"useGrouping","boolean",void 0,!0);internal["[[useGrouping]]"]=g;var stylePatterns=localeData[dataLocale].patterns[s];return internal["[[positivePattern]]"]=stylePatterns.positivePattern,internal["[[negativePattern]]"]=stylePatterns.negativePattern,internal["[[boundFormat]]"]=void 0,internal["[[initializedNumberFormat]]"]=!0,es3&&(numberFormat.format=GetFormatNumber.call(numberFormat)),regexpRestore(),numberFormat}function GetFormatNumber(){var internal=null!==this&&"object"===babelHelpers$1.typeof(this)&&getInternalProperties(this);if(!internal||!internal["[[initializedNumberFormat]]"])throw new TypeError("`this` value for format() is not an initialized Intl.NumberFormat object.");if(void 0===internal["[[boundFormat]]"]){var bf=fnBind.call((function(value){return FormatNumber(this,Number(value))}),this);internal["[[boundFormat]]"]=bf}return internal["[[boundFormat]]"]}function FormatNumberToParts(numberFormat,x){for(var parts=PartitionNumberPattern(numberFormat,x),result=[],n=0,i=0;parts.length>i;i++){var part=parts[i],O={};O.type=part["[[type]]"],O.value=part["[[value]]"],result[n]=O,n+=1}return result}function PartitionNumberPattern(numberFormat,x){var internal=getInternalProperties(numberFormat),locale=internal["[[dataLocale]]"],nums=internal["[[numberingSystem]]"],data=internals.NumberFormat["[[localeData]]"][locale],ild=data.symbols[nums]||data.symbols.latn,pattern=void 0;!isNaN(x)&&x<0?(x=-x,pattern=internal["[[negativePattern]]"]):pattern=internal["[[positivePattern]]"];for(var result=new List,beginIndex=pattern.indexOf("{",0),endIndex=0,nextIndex=0,length=pattern.length;beginIndex>-1&&beginIndex<length;){if(-1===(endIndex=pattern.indexOf("}",beginIndex)))throw new Error;if(beginIndex>nextIndex){var literal=pattern.substring(nextIndex,beginIndex);arrPush.call(result,{"[[type]]":"literal","[[value]]":literal})}var p=pattern.substring(beginIndex+1,endIndex);if("number"===p)if(isNaN(x)){var n=ild.nan;arrPush.call(result,{"[[type]]":"nan","[[value]]":n})}else if(isFinite(x)){"percent"===internal["[[style]]"]&&isFinite(x)&&(x*=100);var _n2=void 0;_n2=hop.call(internal,"[[minimumSignificantDigits]]")&&hop.call(internal,"[[maximumSignificantDigits]]")?ToRawPrecision(x,internal["[[minimumSignificantDigits]]"],internal["[[maximumSignificantDigits]]"]):ToRawFixed(x,internal["[[minimumIntegerDigits]]"],internal["[[minimumFractionDigits]]"],internal["[[maximumFractionDigits]]"]),numSys[nums]?function(){var digits=numSys[nums];_n2=String(_n2).replace(/\d/g,(function(digit){return digits[digit]}))}():_n2=String(_n2);var integer=void 0,fraction=void 0,decimalSepIndex=_n2.indexOf(".",0);if(decimalSepIndex>0?(integer=_n2.substring(0,decimalSepIndex),fraction=_n2.substring(decimalSepIndex+1,decimalSepIndex.length)):(integer=_n2,fraction=void 0),!0===internal["[[useGrouping]]"]){var groupSepSymbol=ild.group,groups=[],pgSize=data.patterns.primaryGroupSize||3,sgSize=data.patterns.secondaryGroupSize||pgSize;if(integer.length>pgSize){var end=integer.length-pgSize,idx=end%sgSize,start=integer.slice(0,idx);for(start.length&&arrPush.call(groups,start);idx<end;)arrPush.call(groups,integer.slice(idx,idx+sgSize)),idx+=sgSize;arrPush.call(groups,integer.slice(end))}else arrPush.call(groups,integer);if(0===groups.length)throw new Error;for(;groups.length;){var integerGroup=arrShift.call(groups);arrPush.call(result,{"[[type]]":"integer","[[value]]":integerGroup}),groups.length&&arrPush.call(result,{"[[type]]":"group","[[value]]":groupSepSymbol})}}else arrPush.call(result,{"[[type]]":"integer","[[value]]":integer});if(void 0!==fraction){var decimalSepSymbol=ild.decimal;arrPush.call(result,{"[[type]]":"decimal","[[value]]":decimalSepSymbol}),arrPush.call(result,{"[[type]]":"fraction","[[value]]":fraction})}}else{var _n=ild.infinity;arrPush.call(result,{"[[type]]":"infinity","[[value]]":_n})}else if("plusSign"===p){var plusSignSymbol=ild.plusSign;arrPush.call(result,{"[[type]]":"plusSign","[[value]]":plusSignSymbol})}else if("minusSign"===p){var minusSignSymbol=ild.minusSign;arrPush.call(result,{"[[type]]":"minusSign","[[value]]":minusSignSymbol})}else if("percentSign"===p&&"percent"===internal["[[style]]"]){var percentSignSymbol=ild.percentSign;arrPush.call(result,{"[[type]]":"literal","[[value]]":percentSignSymbol})}else if("currency"===p&&"currency"===internal["[[style]]"]){var currency=internal["[[currency]]"],cd=void 0;"code"===internal["[[currencyDisplay]]"]?cd=currency:"symbol"===internal["[[currencyDisplay]]"]?cd=data.currencies[currency]||currency:"name"===internal["[[currencyDisplay]]"]&&(cd=currency),arrPush.call(result,{"[[type]]":"currency","[[value]]":cd})}else{var _literal=pattern.substring(beginIndex,endIndex);arrPush.call(result,{"[[type]]":"literal","[[value]]":_literal})}nextIndex=endIndex+1,beginIndex=pattern.indexOf("{",nextIndex)}if(nextIndex<length){var _literal2=pattern.substring(nextIndex,length);arrPush.call(result,{"[[type]]":"literal","[[value]]":_literal2})}return result}function FormatNumber(numberFormat,x){for(var parts=PartitionNumberPattern(numberFormat,x),result="",i=0;parts.length>i;i++){result+=parts[i]["[[value]]"]}return result}function ToRawPrecision(x,minPrecision,maxPrecision){var p=maxPrecision,m=void 0,e=void 0;if(0===x)m=arrJoin.call(Array(p+1),"0"),e=0;else{e=function(n){if("function"==typeof Math.log10)return Math.floor(Math.log10(n));var x=Math.round(Math.log(n)*Math.LOG10E);return x-(Number("1e"+x)>n)}(Math.abs(x));var f=Math.round(Math.exp(Math.abs(e-p+1)*Math.LN10));m=String(Math.round(e-p+1<0?x*f:x/f))}if(e>=p)return m+arrJoin.call(Array(e-p+1+1),"0");if(e===p-1)return m;if(e>=0?m=m.slice(0,e+1)+"."+m.slice(e+1):e<0&&(m="0."+arrJoin.call(Array(1-(e+1)),"0")+m),m.indexOf(".")>=0&&maxPrecision>minPrecision){for(var cut=maxPrecision-minPrecision;cut>0&&"0"===m.charAt(m.length-1);)m=m.slice(0,-1),cut--;"."===m.charAt(m.length-1)&&(m=m.slice(0,-1))}return m}function ToRawFixed(x,minInteger,minFraction,maxFraction){var idx,f=maxFraction,n=Math.pow(10,f)*x,m=0===n?"0":n.toFixed(0),exp=(idx=m.indexOf("e"))>-1?m.slice(idx+1):0;exp&&(m=m.slice(0,idx).replace(".",""),m+=arrJoin.call(Array(exp-(m.length-1)+1),"0"));var int=void 0;if(0!==f){var k=m.length;if(k<=f)m=arrJoin.call(Array(f+1-k+1),"0")+m,k=f+1;var a=m.substring(0,k-f),b=m.substring(k-f,m.length);m=a+"."+b,int=a.length}else int=m.length;for(var cut=maxFraction-minFraction;cut>0&&"0"===m.slice(-1);)m=m.slice(0,-1),cut--;("."===m.slice(-1)&&(m=m.slice(0,-1)),int<minInteger)&&(m=arrJoin.call(Array(minInteger-int+1),"0")+m);return m}defineProperty(Intl,"NumberFormat",{configurable:!0,writable:!0,value:NumberFormatConstructor}),defineProperty(Intl.NumberFormat,"prototype",{writable:!1}),internals.NumberFormat={"[[availableLocales]]":[],"[[relevantExtensionKeys]]":["nu"],"[[localeData]]":{}},defineProperty(Intl.NumberFormat,"supportedLocalesOf",{configurable:!0,writable:!0,value:fnBind.call((function(locales){if(!hop.call(this,"[[availableLocales]]"))throw new TypeError("supportedLocalesOf() is not a constructor");var regexpRestore=createRegExpRestore(),options=arguments[1],availableLocales=this["[[availableLocales]]"],requestedLocales=CanonicalizeLocaleList(locales);return regexpRestore(),SupportedLocales(availableLocales,requestedLocales,options)}),internals.NumberFormat)}),defineProperty(Intl.NumberFormat.prototype,"format",{configurable:!0,get:GetFormatNumber}),Object.defineProperty(Intl.NumberFormat.prototype,"formatToParts",{configurable:!0,enumerable:!1,writable:!0,value:function(){var value=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0],internal=null!==this&&"object"===babelHelpers$1.typeof(this)&&getInternalProperties(this);if(!internal||!internal["[[initializedNumberFormat]]"])throw new TypeError("`this` value for formatToParts() is not an initialized Intl.NumberFormat object.");var x=Number(value);return FormatNumberToParts(this,x)}});var numSys={arab:["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],arabext:["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],bali:["᭐","᭑","᭒","᭓","᭔","᭕","᭖","᭗","᭘","᭙"],beng:["০","১","২","৩","৪","৫","৬","৭","৮","৯"],deva:["०","१","२","३","४","५","६","७","८","९"],fullwide:["0","1","2","3","4","5","6","7","8","9"],gujr:["૦","૧","૨","૩","૪","૫","૬","૭","૮","૯"],guru:["੦","੧","੨","੩","੪","੫","੬","੭","੮","੯"],hanidec:["〇","一","二","三","四","五","六","七","八","九"],khmr:["០","១","២","៣","៤","៥","៦","៧","៨","៩"],knda:["೦","೧","೨","೩","೪","೫","೬","೭","೮","೯"],laoo:["໐","໑","໒","໓","໔","໕","໖","໗","໘","໙"],latn:["0","1","2","3","4","5","6","7","8","9"],limb:["᥆","᥇","᥈","᥉","᥊","᥋","᥌","᥍","᥎","᥏"],mlym:["൦","൧","൨","൩","൪","൫","൬","൭","൮","൯"],mong:["᠐","᠑","᠒","᠓","᠔","᠕","᠖","᠗","᠘","᠙"],mymr:["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],orya:["୦","୧","୨","୩","୪","୫","୬","୭","୮","୯"],tamldec:["௦","௧","௨","௩","௪","௫","௬","௭","௮","௯"],telu:["౦","౧","౨","౩","౪","౫","౬","౭","౮","౯"],thai:["๐","๑","๒","๓","๔","๕","๖","๗","๘","๙"],tibt:["༠","༡","༢","༣","༤","༥","༦","༧","༨","༩"]};defineProperty(Intl.NumberFormat.prototype,"resolvedOptions",{configurable:!0,writable:!0,value:function(){var prop=void 0,descs=new Record,props=["locale","numberingSystem","style","currency","currencyDisplay","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","useGrouping"],internal=null!==this&&"object"===babelHelpers$1.typeof(this)&&getInternalProperties(this);if(!internal||!internal["[[initializedNumberFormat]]"])throw new TypeError("`this` value for resolvedOptions() is not an initialized Intl.NumberFormat object.");for(var i=0,max=props.length;i<max;i++)hop.call(internal,prop="[["+props[i]+"]]")&&(descs[props[i]]={value:internal[prop],writable:!0,configurable:!0,enumerable:!0});return objCreate({},descs)}});var expDTComponents=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,expPatternTrimmer=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,unwantedDTCs=/[rqQASjJgwWIQq]/,dtKeys=["era","year","month","day","weekday","quarter"],tmKeys=["hour","minute","second","hour12","timeZoneName"];function isDateFormatOnly(obj){for(var i=0;i<tmKeys.length;i+=1)if(obj.hasOwnProperty(tmKeys[i]))return!1;return!0}function isTimeFormatOnly(obj){for(var i=0;i<dtKeys.length;i+=1)if(obj.hasOwnProperty(dtKeys[i]))return!1;return!0}function joinDateAndTimeFormats(dateFormatObj,timeFormatObj){for(var o={_:{}},i=0;i<dtKeys.length;i+=1)dateFormatObj[dtKeys[i]]&&(o[dtKeys[i]]=dateFormatObj[dtKeys[i]]),dateFormatObj._[dtKeys[i]]&&(o._[dtKeys[i]]=dateFormatObj._[dtKeys[i]]);for(var j=0;j<tmKeys.length;j+=1)timeFormatObj[tmKeys[j]]&&(o[tmKeys[j]]=timeFormatObj[tmKeys[j]]),timeFormatObj._[tmKeys[j]]&&(o._[tmKeys[j]]=timeFormatObj._[tmKeys[j]]);return o}function computeFinalPatterns(formatObj){return formatObj.pattern12=formatObj.extendedPattern.replace(/'([^']*)'/g,(function($0,literal){return literal||"'"})),formatObj.pattern=formatObj.pattern12.replace("{ampm}","").replace(expPatternTrimmer,""),formatObj}function expDTComponentsMeta($0,formatObj){switch($0.charAt(0)){case"G":return formatObj.era=["short","short","short","long","narrow"][$0.length-1],"{era}";case"y":case"Y":case"u":case"U":case"r":return formatObj.year=2===$0.length?"2-digit":"numeric","{year}";case"Q":case"q":return formatObj.quarter=["numeric","2-digit","short","long","narrow"][$0.length-1],"{quarter}";case"M":case"L":return formatObj.month=["numeric","2-digit","short","long","narrow"][$0.length-1],"{month}";case"w":return formatObj.week=2===$0.length?"2-digit":"numeric","{weekday}";case"W":return formatObj.week="numeric","{weekday}";case"d":return formatObj.day=2===$0.length?"2-digit":"numeric","{day}";case"D":case"F":case"g":return formatObj.day="numeric","{day}";case"E":return formatObj.weekday=["short","short","short","long","narrow","short"][$0.length-1],"{weekday}";case"e":return formatObj.weekday=["numeric","2-digit","short","long","narrow","short"][$0.length-1],"{weekday}";case"c":return formatObj.weekday=["numeric",void 0,"short","long","narrow","short"][$0.length-1],"{weekday}";case"a":case"b":case"B":return formatObj.hour12=!0,"{ampm}";case"h":case"H":return formatObj.hour=2===$0.length?"2-digit":"numeric","{hour}";case"k":case"K":return formatObj.hour12=!0,formatObj.hour=2===$0.length?"2-digit":"numeric","{hour}";case"m":return formatObj.minute=2===$0.length?"2-digit":"numeric","{minute}";case"s":return formatObj.second=2===$0.length?"2-digit":"numeric","{second}";case"S":case"A":return formatObj.second="numeric","{second}";case"z":case"Z":case"O":case"v":case"V":case"X":case"x":return formatObj.timeZoneName=$0.length<4?"short":"long","{timeZoneName}"}}function createDateTimeFormat(skeleton,pattern){if(!unwantedDTCs.test(pattern)){var formatObj={originalPattern:pattern,_:{}};return formatObj.extendedPattern=pattern.replace(expDTComponents,(function($0){return expDTComponentsMeta($0,formatObj._)})),skeleton.replace(expDTComponents,(function($0){return expDTComponentsMeta($0,formatObj)})),computeFinalPatterns(formatObj)}}var validSyntheticProps={second:{numeric:"s","2-digit":"ss"},minute:{numeric:"m","2-digit":"mm"},year:{numeric:"y","2-digit":"yy"},day:{numeric:"d","2-digit":"dd"},month:{numeric:"L","2-digit":"LL",narrow:"LLLLL",short:"LLL",long:"LLLL"},weekday:{narrow:"ccccc",short:"ccc",long:"cccc"}};var dateWidths=objCreate(null,{narrow:{},short:{},long:{}});function resolveDateString(data,ca,component,width,key){var obj=data[ca]&&data[ca][component]?data[ca][component]:data.gregory[component],alts={narrow:["short","long"],short:["long","narrow"],long:["short","narrow"]},resolved=hop.call(obj,width)?obj[width]:hop.call(obj,alts[width][0])?obj[alts[width][0]]:obj[alts[width][1]];return null!==key?resolved[key]:resolved}function DateTimeFormatConstructor(){var locales=arguments[0],options=arguments[1];return this&&this!==Intl?InitializeDateTimeFormat(toObject(this),locales,options):new Intl.DateTimeFormat(locales,options)}function InitializeDateTimeFormat(dateTimeFormat,locales,options){var internal=getInternalProperties(dateTimeFormat),regexpRestore=createRegExpRestore();if(!0===internal["[[initializedIntlObject]]"])throw new TypeError("`this` object has already been initialized as an Intl object");defineProperty(dateTimeFormat,"__getInternalProperties",{value:function(){if(arguments[0]===secret)return internal}}),internal["[[initializedIntlObject]]"]=!0;var requestedLocales=CanonicalizeLocaleList(locales);options=ToDateTimeOptions(options,"any","date");var opt=new Record,matcher=GetOption(options,"localeMatcher","string",new List("lookup","best fit"),"best fit");opt["[[localeMatcher]]"]=matcher;var DateTimeFormat=internals.DateTimeFormat,localeData=DateTimeFormat["[[localeData]]"],r=ResolveLocale(DateTimeFormat["[[availableLocales]]"],requestedLocales,opt,DateTimeFormat["[[relevantExtensionKeys]]"],localeData);internal["[[locale]]"]=r["[[locale]]"],internal["[[calendar]]"]=r["[[ca]]"],internal["[[numberingSystem]]"]=r["[[nu]]"],internal["[[dataLocale]]"]=r["[[dataLocale]]"];var dataLocale=r["[[dataLocale]]"],tz=options.timeZone;if(void 0!==tz&&"UTC"!==(tz=toLatinUpperCase(tz)))throw new RangeError("timeZone is not supported.");for(var prop in internal["[[timeZone]]"]=tz,opt=new Record,dateTimeComponents)if(hop.call(dateTimeComponents,prop)){var value=GetOption(options,prop,"string",dateTimeComponents[prop]);opt["[["+prop+"]]"]=value}var bestFormat=void 0,dataLocaleData=localeData[dataLocale],formats=function(formats){if("[object Array]"===Object.prototype.toString.call(formats))return formats;return function(formats){var availableFormats=formats.availableFormats,timeFormats=formats.timeFormats,dateFormats=formats.dateFormats,result=[],skeleton=void 0,pattern=void 0,computed=void 0,i=void 0,j=void 0,timeRelatedFormats=[],dateRelatedFormats=[];for(skeleton in availableFormats)availableFormats.hasOwnProperty(skeleton)&&(computed=createDateTimeFormat(skeleton,pattern=availableFormats[skeleton]))&&(result.push(computed),isDateFormatOnly(computed)?dateRelatedFormats.push(computed):isTimeFormatOnly(computed)&&timeRelatedFormats.push(computed));for(skeleton in timeFormats)timeFormats.hasOwnProperty(skeleton)&&(computed=createDateTimeFormat(skeleton,pattern=timeFormats[skeleton]))&&(result.push(computed),timeRelatedFormats.push(computed));for(skeleton in dateFormats)dateFormats.hasOwnProperty(skeleton)&&(computed=createDateTimeFormat(skeleton,pattern=dateFormats[skeleton]))&&(result.push(computed),dateRelatedFormats.push(computed));for(i=0;i<timeRelatedFormats.length;i+=1)for(j=0;j<dateRelatedFormats.length;j+=1)pattern="long"===dateRelatedFormats[j].month?dateRelatedFormats[j].weekday?formats.full:formats.long:"short"===dateRelatedFormats[j].month?formats.medium:formats.short,(computed=joinDateAndTimeFormats(dateRelatedFormats[j],timeRelatedFormats[i])).originalPattern=pattern,computed.extendedPattern=pattern.replace("{0}",timeRelatedFormats[i].extendedPattern).replace("{1}",dateRelatedFormats[j].extendedPattern).replace(/^[,\s]+|[,\s]+$/gi,""),result.push(computeFinalPatterns(computed));return result}(formats)}(dataLocaleData.formats);if(matcher=GetOption(options,"formatMatcher","string",new List("basic","best fit"),"best fit"),dataLocaleData.formats=formats,"basic"===matcher)bestFormat=function(options,formats){var bestScore=-1/0,bestFormat=void 0,i=0,len=formats.length;for(;i<len;){var format=formats[i],score=0;for(var property in dateTimeComponents)if(hop.call(dateTimeComponents,property)){var optionsProp=options["[["+property+"]]"],formatProp=hop.call(format,property)?format[property]:void 0;if(void 0===optionsProp&&void 0!==formatProp)score-=20;else if(void 0!==optionsProp&&void 0===formatProp)score-=120;else{var values=["2-digit","numeric","narrow","short","long"],optionsPropIndex=arrIndexOf.call(values,optionsProp),formatPropIndex=arrIndexOf.call(values,formatProp),delta=Math.max(Math.min(formatPropIndex-optionsPropIndex,2),-2);2===delta?score-=6:1===delta?score-=3:-1===delta?score-=6:-2===delta&&(score-=8)}}score>bestScore&&(bestScore=score,bestFormat=format),i++}return bestFormat}(opt,formats);else{var _hr=GetOption(options,"hour12","boolean");opt.hour12=void 0===_hr?dataLocaleData.hour12:_hr,bestFormat=function(options,formats){var optionsPropNames=[];for(var property in dateTimeComponents)hop.call(dateTimeComponents,property)&&void 0!==options["[["+property+"]]"]&&optionsPropNames.push(property);if(1===optionsPropNames.length){var _bestFormat=function(propName,propValue){var _ref2;if(validSyntheticProps[propName]&&validSyntheticProps[propName][propValue])return _ref2={originalPattern:validSyntheticProps[propName][propValue],_:defineProperty$1({},propName,propValue),extendedPattern:"{"+propName+"}"},defineProperty$1(_ref2,propName,propValue),defineProperty$1(_ref2,"pattern12","{"+propName+"}"),defineProperty$1(_ref2,"pattern","{"+propName+"}"),_ref2}(optionsPropNames[0],options["[["+optionsPropNames[0]+"]]"]);if(_bestFormat)return _bestFormat}var bestScore=-1/0,bestFormat=void 0,i=0,len=formats.length;for(;i<len;){var format=formats[i],score=0;for(var _property in dateTimeComponents)if(hop.call(dateTimeComponents,_property)){var optionsProp=options["[["+_property+"]]"],formatProp=hop.call(format,_property)?format[_property]:void 0,patternProp=hop.call(format._,_property)?format._[_property]:void 0;if(optionsProp!==patternProp&&(score-=2),void 0===optionsProp&&void 0!==formatProp)score-=20;else if(void 0!==optionsProp&&void 0===formatProp)score-=120;else{var values=["2-digit","numeric","narrow","short","long"],optionsPropIndex=arrIndexOf.call(values,optionsProp),formatPropIndex=arrIndexOf.call(values,formatProp),delta=Math.max(Math.min(formatPropIndex-optionsPropIndex,2),-2);formatPropIndex<=1&&optionsPropIndex>=2||formatPropIndex>=2&&optionsPropIndex<=1?delta>0?score-=6:delta<0&&(score-=8):delta>1?score-=3:delta<-1&&(score-=6)}}format._.hour12!==options.hour12&&(score-=1),score>bestScore&&(bestScore=score,bestFormat=format),i++}return bestFormat}(opt,formats)}for(var _prop in dateTimeComponents)if(hop.call(dateTimeComponents,_prop)&&hop.call(bestFormat,_prop)){var p=bestFormat[_prop];p=bestFormat._&&hop.call(bestFormat._,_prop)?bestFormat._[_prop]:p,internal["[["+_prop+"]]"]=p}var pattern=void 0,hr12=GetOption(options,"hour12","boolean");if(internal["[[hour]]"])if(hr12=void 0===hr12?dataLocaleData.hour12:hr12,internal["[[hour12]]"]=hr12,!0===hr12){var hourNo0=dataLocaleData.hourNo0;internal["[[hourNo0]]"]=hourNo0,pattern=bestFormat.pattern12}else pattern=bestFormat.pattern;else pattern=bestFormat.pattern;return internal["[[pattern]]"]=pattern,internal["[[boundFormat]]"]=void 0,internal["[[initializedDateTimeFormat]]"]=!0,es3&&(dateTimeFormat.format=GetFormatDateTime.call(dateTimeFormat)),regexpRestore(),dateTimeFormat}defineProperty(Intl,"DateTimeFormat",{configurable:!0,writable:!0,value:DateTimeFormatConstructor}),defineProperty(DateTimeFormatConstructor,"prototype",{writable:!1});var dateTimeComponents={weekday:["narrow","short","long"],era:["narrow","short","long"],year:["2-digit","numeric"],month:["2-digit","numeric","narrow","short","long"],day:["2-digit","numeric"],hour:["2-digit","numeric"],minute:["2-digit","numeric"],second:["2-digit","numeric"],timeZoneName:["short","long"]};function ToDateTimeOptions(options,required,defaults){if(void 0===options)options=null;else{var opt2=toObject(options);for(var k in options=new Record,opt2)options[k]=opt2[k]}options=objCreate(options);var needDefaults=!0;return"date"!==required&&"any"!==required||void 0===options.weekday&&void 0===options.year&&void 0===options.month&&void 0===options.day||(needDefaults=!1),"time"!==required&&"any"!==required||void 0===options.hour&&void 0===options.minute&&void 0===options.second||(needDefaults=!1),!needDefaults||"date"!==defaults&&"all"!==defaults||(options.year=options.month=options.day="numeric"),!needDefaults||"time"!==defaults&&"all"!==defaults||(options.hour=options.minute=options.second="numeric"),options}function GetFormatDateTime(){var internal=null!==this&&"object"===babelHelpers$1.typeof(this)&&getInternalProperties(this);if(!internal||!internal["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for format() is not an initialized Intl.DateTimeFormat object.");if(void 0===internal["[[boundFormat]]"]){var bf=fnBind.call((function(){var date=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0],x=void 0===date?Date.now():toNumber(date);return FormatDateTime(this,x)}),this);internal["[[boundFormat]]"]=bf}return internal["[[boundFormat]]"]}function CreateDateTimeParts(dateTimeFormat,x){if(!isFinite(x))throw new RangeError("Invalid valid date passed to format");var internal=dateTimeFormat.__getInternalProperties(secret);createRegExpRestore();for(var date,timeZone,d,m,locale=internal["[[locale]]"],nf=new Intl.NumberFormat([locale],{useGrouping:!1}),nf2=new Intl.NumberFormat([locale],{minimumIntegerDigits:2,useGrouping:!1}),tm=(date=x,internal["[[calendar]]"],timeZone=internal["[[timeZone]]"],new Record({"[[weekday]]":(d=new Date(date))[(m="get"+(timeZone||""))+"Day"](),"[[era]]":+(d[m+"FullYear"]()>=0),"[[year]]":d[m+"FullYear"](),"[[month]]":d[m+"Month"](),"[[day]]":d[m+"Date"](),"[[hour]]":d[m+"Hours"](),"[[minute]]":d[m+"Minutes"](),"[[second]]":d[m+"Seconds"](),"[[inDST]]":!1})),pattern=internal["[[pattern]]"],result=new List,index=0,beginIndex=pattern.indexOf("{"),endIndex=0,dataLocale=internal["[[dataLocale]]"],localeData=internals.DateTimeFormat["[[localeData]]"][dataLocale].calendars,ca=internal["[[calendar]]"];-1!==beginIndex;){var fv=void 0;if(-1===(endIndex=pattern.indexOf("}",beginIndex)))throw new Error("Unclosed pattern");beginIndex>index&&arrPush.call(result,{type:"literal",value:pattern.substring(index,beginIndex)});var p=pattern.substring(beginIndex+1,endIndex);if(dateTimeComponents.hasOwnProperty(p)){var f=internal["[["+p+"]]"],v=tm["[["+p+"]]"];if("year"===p&&v<=0?v=1-v:"month"===p?v++:"hour"===p&&!0===internal["[[hour12]]"]&&0===(v%=12)&&!0===internal["[[hourNo0]]"]&&(v=12),"numeric"===f)fv=FormatNumber(nf,v);else if("2-digit"===f)(fv=FormatNumber(nf2,v)).length>2&&(fv=fv.slice(-2));else if(f in dateWidths)switch(p){case"month":fv=resolveDateString(localeData,ca,"months",f,tm["[["+p+"]]"]);break;case"weekday":try{fv=resolveDateString(localeData,ca,"days",f,tm["[["+p+"]]"])}catch(e){throw new Error("Could not find weekday data for locale "+locale)}break;case"timeZoneName":fv="";break;case"era":try{fv=resolveDateString(localeData,ca,"eras",f,tm["[["+p+"]]"])}catch(e){throw new Error("Could not find era data for locale "+locale)}break;default:fv=tm["[["+p+"]]"]}arrPush.call(result,{type:p,value:fv})}else if("ampm"===p){fv=resolveDateString(localeData,ca,"dayPeriods",tm["[[hour]]"]>11?"pm":"am",null),arrPush.call(result,{type:"dayPeriod",value:fv})}else arrPush.call(result,{type:"literal",value:pattern.substring(beginIndex,endIndex+1)});index=endIndex+1,beginIndex=pattern.indexOf("{",index)}return endIndex<pattern.length-1&&arrPush.call(result,{type:"literal",value:pattern.substr(endIndex+1)}),result}function FormatDateTime(dateTimeFormat,x){for(var parts=CreateDateTimeParts(dateTimeFormat,x),result="",i=0;parts.length>i;i++){result+=parts[i].value}return result}function FormatToPartsDateTime(dateTimeFormat,x){for(var parts=CreateDateTimeParts(dateTimeFormat,x),result=[],i=0;parts.length>i;i++){var part=parts[i];result.push({type:part.type,value:part.value})}return result}internals.DateTimeFormat={"[[availableLocales]]":[],"[[relevantExtensionKeys]]":["ca","nu"],"[[localeData]]":{}},defineProperty(Intl.DateTimeFormat,"supportedLocalesOf",{configurable:!0,writable:!0,value:fnBind.call((function(locales){if(!hop.call(this,"[[availableLocales]]"))throw new TypeError("supportedLocalesOf() is not a constructor");var regexpRestore=createRegExpRestore(),options=arguments[1],availableLocales=this["[[availableLocales]]"],requestedLocales=CanonicalizeLocaleList(locales);return regexpRestore(),SupportedLocales(availableLocales,requestedLocales,options)}),internals.NumberFormat)}),defineProperty(Intl.DateTimeFormat.prototype,"format",{configurable:!0,get:GetFormatDateTime}),Object.defineProperty(Intl.DateTimeFormat.prototype,"formatToParts",{enumerable:!1,writable:!0,configurable:!0,value:function(){var date=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0],internal=null!==this&&"object"===babelHelpers$1.typeof(this)&&getInternalProperties(this);if(!internal||!internal["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for formatToParts() is not an initialized Intl.DateTimeFormat object.");var x=void 0===date?Date.now():toNumber(date);return FormatToPartsDateTime(this,x)}}),defineProperty(Intl.DateTimeFormat.prototype,"resolvedOptions",{writable:!0,configurable:!0,value:function(){var prop=void 0,descs=new Record,props=["locale","calendar","numberingSystem","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName"],internal=null!==this&&"object"===babelHelpers$1.typeof(this)&&getInternalProperties(this);if(!internal||!internal["[[initializedDateTimeFormat]]"])throw new TypeError("`this` value for resolvedOptions() is not an initialized Intl.DateTimeFormat object.");for(var i=0,max=props.length;i<max;i++)hop.call(internal,prop="[["+props[i]+"]]")&&(descs[props[i]]={value:internal[prop],writable:!0,configurable:!0,enumerable:!0});return objCreate({},descs)}});var ls=Intl.__localeSensitiveProtos={Number:{},Date:{}};ls.Number.toLocaleString=function(){if("[object Number]"!==Object.prototype.toString.call(this))throw new TypeError("`this` value must be a number for Number.prototype.toLocaleString()");return FormatNumber(new NumberFormatConstructor(arguments[0],arguments[1]),this)},ls.Date.toLocaleString=function(){if("[object Date]"!==Object.prototype.toString.call(this))throw new TypeError("`this` value must be a Date instance for Date.prototype.toLocaleString()");var x=+this;if(isNaN(x))return"Invalid Date";var locales=arguments[0],options=arguments[1],dateTimeFormat=new DateTimeFormatConstructor(locales,options=ToDateTimeOptions(options,"any","all"));return FormatDateTime(dateTimeFormat,x)},ls.Date.toLocaleDateString=function(){if("[object Date]"!==Object.prototype.toString.call(this))throw new TypeError("`this` value must be a Date instance for Date.prototype.toLocaleDateString()");var x=+this;if(isNaN(x))return"Invalid Date";var locales=arguments[0],options=arguments[1],dateTimeFormat=new DateTimeFormatConstructor(locales,options=ToDateTimeOptions(options,"date","date"));return FormatDateTime(dateTimeFormat,x)},ls.Date.toLocaleTimeString=function(){if("[object Date]"!==Object.prototype.toString.call(this))throw new TypeError("`this` value must be a Date instance for Date.prototype.toLocaleTimeString()");var x=+this;if(isNaN(x))return"Invalid Date";var locales=arguments[0],options=arguments[1],dateTimeFormat=new DateTimeFormatConstructor(locales,options=ToDateTimeOptions(options,"time","time"));return FormatDateTime(dateTimeFormat,x)},defineProperty(Intl,"__applyLocaleSensitivePrototypes",{writable:!0,configurable:!0,value:function(){for(var k in defineProperty(Number.prototype,"toLocaleString",{writable:!0,configurable:!0,value:ls.Number.toLocaleString}),defineProperty(Date.prototype,"toLocaleString",{writable:!0,configurable:!0,value:ls.Date.toLocaleString}),ls.Date)hop.call(ls.Date,k)&&defineProperty(Date.prototype,k,{writable:!0,configurable:!0,value:ls.Date[k]})}}),defineProperty(Intl,"__addLocaleData",{value:function(data){if(!IsStructurallyValidLanguageTag(data.locale))throw new Error("Object passed doesn't identify itself with a valid language tag");!function(data,tag){if(!data.number)throw new Error("Object passed doesn't contain locale data for Intl.NumberFormat");var locale=void 0,locales=[tag],parts=tag.split("-");parts.length>2&&4===parts[1].length&&arrPush.call(locales,parts[0]+"-"+parts[2]);for(;locale=arrShift.call(locales);)arrPush.call(internals.NumberFormat["[[availableLocales]]"],locale),internals.NumberFormat["[[localeData]]"][locale]=data.number,data.date&&(data.date.nu=data.number.nu,arrPush.call(internals.DateTimeFormat["[[availableLocales]]"],locale),internals.DateTimeFormat["[[localeData]]"][locale]=data.date);void 0===defaultLocale&&function(locale){defaultLocale=locale}(tag)}(data,data.locale)}}),defineProperty(Intl,"__disableRegExpRestore",{value:function(){internals.disableRegExpRestore=!0}}),module.exports=Intl}).call(this,__webpack_require__(44))},487:function(module,exports,__webpack_require__){(function(global){global.IntlPolyfill=__webpack_require__(1236),__webpack_require__(1237),global.Intl||(global.Intl=global.IntlPolyfill,global.IntlPolyfill.__applyLocaleSensitivePrototypes()),module.exports=global.IntlPolyfill}).call(this,__webpack_require__(44))}}]);
//# sourceMappingURL=kolibri.core.default_frontend-vendors~intl-0.14.3.js.map | 28,448.5 | 56,819 | 0.728035 |
83cb80b50ff7d84614c74d9504fa511468cc9e63 | 1,493 | js | JavaScript | index.js | kbzowski/node-ecowater-client | c9c45151125da679bfcd56228b7eb0a0bbc733cc | [
"MIT"
] | 1 | 2021-07-10T21:45:35.000Z | 2021-07-10T21:45:35.000Z | index.js | kbzowski/node-ecowater-client | c9c45151125da679bfcd56228b7eb0a0bbc733cc | [
"MIT"
] | null | null | null | index.js | kbzowski/node-ecowater-client | c9c45151125da679bfcd56228b7eb0a0bbc733cc | [
"MIT"
] | null | null | null | import {sleep, Status} from "./helpers";
import {auth, get_stats, last_update_time, update_stats} from "./api";
import dotenv from "dotenv"
dotenv.config();
try{
await auth(process.env.ECOWATER_EMAIL, process.env.ECOWATER_PASSWORD);
} catch (e) {
console.error(e)
process.exit(1);
}
const device = process.env.ECOWATER_DEVICE
while(true) {
const last_update = await last_update_time(device);
const now = new Date();
const diff = (now.getTime() - last_update.getTime()) / 1000;
if (diff < 10) break;
await update_stats(device);
await sleep(5000)
}
const stats = await get_stats(device);
console.log(`Average daily use: ${stats.avg_daily_use_gals.toFixed(2)} litres`);
console.log(`Treated water available: ${stats.treated_water_avail_gals.toFixed(2)} litres`);
console.log(`Litres used today: ${stats.gallons_used_today.toFixed(2)}`)
console.log(`Current water flow: ${stats.current_water_flow.toFixed(2)} l/min`)
console.log('')
console.log(`Status: ${stats.status}`)
if(stats.status === Status.Regenerating) {
console.log(`Regen remaining time: ${stats.regen_time_rem.toISOString().substr(11, 8)}`);
}
console.log(`Days since last regen: ${stats.days_since_last_regen}`);
console.log(`Remaining ion-exchange capacity: ${stats.capacity_remaining_percent}% (min: ${stats.average_exhaustion_percent}%)`)
console.log('')
console.log(`Salt level: ${stats.salt_level}%`)
console.log(`Out of salt estimate days: ${stats.out_of_salt_estimate_days}`)
| 33.931818 | 128 | 0.726055 |
83cc31778de9679d54c6a5cd289aeab23dcbdd63 | 5,221 | js | JavaScript | resources/js/app.js | EdwinGuano/SGAcademico2022 | 1d20cc3f6c3243df489642033b4ae837017dbefd | [
"MIT"
] | null | null | null | resources/js/app.js | EdwinGuano/SGAcademico2022 | 1d20cc3f6c3243df489642033b4ae837017dbefd | [
"MIT"
] | null | null | null | resources/js/app.js | EdwinGuano/SGAcademico2022 | 1d20cc3f6c3243df489642033b4ae837017dbefd | [
"MIT"
] | null | null | null | /**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
window.Vue = require('vue').default;
import VueRouter from 'vue-router'
Vue.use(VueRouter);
import Vuetify from 'vuetify'
Vue.use(Vuetify);
/* sweet alert */
import Swal from 'sweetalert'
window.Swal = Swal; //para poder usar globalmente
import 'sweetalert/dist/sweetalert.min.js'
import Multiselect from 'vue-multiselect'
window.Multiselect = Multiselect; //para poder usar globalmente
import 'vue-multiselect/dist/vue-multiselect.min.css'
Vue.component('multiselect', Multiselect)
import Datepicker from 'vuejs-datepicker';
import vuetify from './vuetify'
import GeneralGeneral from './components/General/General.vue'
import CalificacionesCalificaciones from './components/Calificaciones/Calificaciones.vue'
// import AnasisdatosAnasisdatos from './components/Anasisdatos/Anasisdatos.vue'
import AnalisisdatoscursosAnalisisdatoscursos from './components/Analisis/Analisisdatoscursos.vue'
import AnalisisdatoscursosrangosAnalisisdatoscursosrangos from './components/Analisis/Analisisdatoscursosrangos.vue'
import AlumnosAlumnos from './components/Alumnos/Alumnos.vue'
import AulasAulas from './components/Aulas/Aulas.vue'
import DocentesDocentes from './components/Docentes/Docentes.vue'
import MatriculacionMatriculacion from './components/Matriculacion/Matriculacion.vue'
import ActividadesActividades from './components/Actividades/Actividades.vue'
import EvaluacionesEvaluaciones from './components/Evaluaciones/Evaluaciones.vue'
import CursosCursos from './components/Cursos/Cursos.vue'
import SeccionSeccion from './components/Seccion/Seccion.vue'
import MateriasMaterias from './components/Materias/Materias.vue'
import PeriodosPeriodos from './components/Periodos/Periodos.vue'
import PlanesPlanes from './components/Planesestudios/Planesestudios.vue'
import AsignadocAsignadoc from './components/Asignadoc/Asignadoc.vue'
import ModalidadModalidad from './components/Modalidad/Modalidad.vue'
import RepartoReparto from './components/Reparto/Reparto.vue'
import EspecialidadEspecialidad from './components/Especialidad/Especialidad.vue'
import TipogradoTipogrado from './components/Tipogrado/Tipogrado.vue'
import TipocursoTipocurso from './components/Tipocurso/Tipocurso.vue'
import TiposangreTiposangre from './components/Tiposangre/Tiposangre.vue'
import EjecursoEjecurso from './components/Ejecurso/Ejecurso.vue'
import UsuarioUsuario from './components/Usuario/Usuario.vue'
import RolesRoles from './components/Roles/Roles.vue'
import PasswordPassword from './components/Password/Password.vue'
import SalirSalir from './components/Salir/Salir.vue'
import PorcentajePorcentaje from './components/Porcentajes/Porcentaje.vue'
import PiereportePiereporte from './components/Piereporte/Piereporte.vue'
import ReportematriculaReportematricula from './components/Reportes/Matricula.vue'
import ReporteregistronotaReporteregistronota from './components/Reportes/RegistroNota.vue'
import ReportenotasReportenotas from './components/Reportes/Nota.vue'
import ReportecursoReportecurso from './components/Reportes/Curso.vue'
/**
* The following block of code may be used to automatically register your
* Vue components. It will recursively scan this directory for the Vue
* components and automatically register them with their "basename".
*
* Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
*/
// const files = require.context('./', true, /\.vue$/i)
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))
// Vue.component('example-component', require('./components/ExampleComponent.vue').default);
Vue.component('Reparto-component', require('./components/Reparto/Reparto.vue').default);
/**
* Next, we will create a fresh Vue application instance and attach it to
* the page. Then, you may begin adding components to this application
* or customize the JavaScript scaffolding to fit your unique needs.
*/
const app = new Vue({
el: '#app',
vuetify: new Vuetify(),
Datepicker,
components: {
AnalisisdatoscursosAnalisisdatoscursos,
AnalisisdatoscursosrangosAnalisisdatoscursosrangos,
AlumnosAlumnos,
AulasAulas,
CursosCursos,
MateriasMaterias,
PeriodosPeriodos,
PlanesPlanes,
AsignadocAsignadoc,
ModalidadModalidad,
SeccionSeccion,
RepartoReparto,
EspecialidadEspecialidad,
TipogradoTipogrado,
TipocursoTipocurso,
TiposangreTiposangre,
MatriculacionMatriculacion,
ActividadesActividades,
EvaluacionesEvaluaciones,
GeneralGeneral,
CalificacionesCalificaciones,
EjecursoEjecurso,
DocentesDocentes,
UsuarioUsuario,
RolesRoles,
PasswordPassword,
PorcentajePorcentaje,
PiereportePiereporte,
ReportematriculaReportematricula,
ReporteregistronotaReporteregistronota,
ReportenotasReportenotas,
ReportecursoReportecurso,
}
});
| 40.161538 | 116 | 0.776863 |
83cc37b74e8216bbe846a4008c4d9ce1295e5210 | 1,129 | js | JavaScript | src/handlers/joinme.handler.js | redpulse96/AuthModule | a6f60b95f79346e8dc32a7ab6eac239ce61de3ec | [
"Unlicense"
] | null | null | null | src/handlers/joinme.handler.js | redpulse96/AuthModule | a6f60b95f79346e8dc32a7ab6eac239ce61de3ec | [
"Unlicense"
] | null | null | null | src/handlers/joinme.handler.js | redpulse96/AuthModule | a6f60b95f79346e8dc32a7ab6eac239ce61de3ec | [
"Unlicense"
] | null | null | null | let storedCookiesToRedirectionUrl = {};
async function joinMeHandler(req, res) {
storedCookiesToRedirectionUrl[req.sessionID] =
req.query.rel || req.headers.rel || req.rel || `http://${req.headers.host}/`;
const client_id = process.env.JOIN_ME_CLIENT_ID;
const scope = 'scheduler%20start_meeting';
const redirect_uri = process.env.JOIN_ME_CURRENT_URL;
const state = 'TEST';
const response_type = 'code';
const redirectionUrl = `${process.env.JOIN_ME_AUTH_REDIRECTION_URL}?client_id=${client_id}&scope=${scope}&redirect_uri=${redirect_uri}&state=${state}&response_type=${response_type}`;
return res.redirect(redirectionUrl);
}
async function callbackFn(req, res) {
console.log(req);
const {
query: { code, state },
} = req;
let redirectUrl = `${process.env.REDIRECT_URL}?code=${code}$state=${state}`;
for (const key in storedCookiesToRedirectionUrl) {
if (req.sessionStore && req.sessionStore.sessions && req.sessionStore.sessions[key]) {
redirectUrl = storedCookiesToRedirectionUrl[key];
}
}
res.redirect(redirectUrl);
}
module.exports = {
joinMeHandler,
callbackFn,
};
| 34.212121 | 184 | 0.720106 |
83cc4e7c0c75fc9e6b34c5ffc1fe186d56c3b284 | 5,502 | js | JavaScript | src/main/webapp/static/homePage/bootstrap_admin/scripts/shuiyin.js | st226/jeesite | 07048214cdb72fa8e7ace1b41cb6c04828c4a4c1 | [
"Apache-2.0"
] | 2 | 2021-12-30T09:12:04.000Z | 2021-12-30T09:12:06.000Z | src/main/webapp/static/homePage/bootstrap_admin/scripts/shuiyin.js | st226/jeesite | 07048214cdb72fa8e7ace1b41cb6c04828c4a4c1 | [
"Apache-2.0"
] | 9 | 2020-09-09T19:51:51.000Z | 2022-02-01T01:03:05.000Z | src/main/webapp/static/homePage/bootstrap_admin/scripts/shuiyin.js | st226/jeesite | 07048214cdb72fa8e7ace1b41cb6c04828c4a4c1 | [
"Apache-2.0"
] | 2 | 2021-12-01T12:48:49.000Z | 2021-12-08T14:57:16.000Z | function watermark(settings) {
//默认设置
var defaultSettings = {
watermark_txt: "text",
watermark_x: 20, //水印起始位置x轴坐标
watermark_y: 20, //水印起始位置Y轴坐标
watermark_rows: 20, //水印行数
watermark_cols: 20, //水印列数
watermark_x_space: 100, //水印x轴间隔
watermark_y_space: 50, //水印y轴间隔
watermark_color: '#aaa', //水印字体颜色
watermark_alpha: 0.4, //水印透明度
watermark_fontsize: '15px', //水印字体大小
watermark_font: '微软雅黑', //水印字体
watermark_width: 210, //水印宽度
watermark_height: 80, //水印长度
watermark_angle: 20 //水印倾斜度数
};
if (arguments.length === 1 && typeof arguments[0] === "object") {
var src = arguments[0] || {};
for (key in src) {
if (src[key] && defaultSettings[key] && src[key] === defaultSettings[key]) continue;
else if (src[key]) defaultSettings[key] = src[key];
}
}
var oTemp = document.createDocumentFragment();
//获取页面最大宽度
var page_width = Math.max(document.body.scrollWidth, document.body.clientWidth);
var cutWidth = page_width * 0.0150;
var page_width = page_width - cutWidth;
//获取页面最大高度
var page_height = Math.max(document.body.scrollHeight, document.body.clientHeight) + 450;
page_height = Math.max(page_height, window.innerHeight - 30);
//如果将水印列数设置为0,或水印列数设置过大,超过页面最大宽度,则重新计算水印列数和水印x轴间隔
if (defaultSettings.watermark_cols == 0 || (parseInt(defaultSettings.watermark_x + defaultSettings.watermark_width * defaultSettings.watermark_cols + defaultSettings.watermark_x_space * (defaultSettings.watermark_cols - 1)) > page_width)) {
defaultSettings.watermark_cols = parseInt((page_width - defaultSettings.watermark_x + defaultSettings.watermark_x_space) / (defaultSettings.watermark_width + defaultSettings.watermark_x_space));
defaultSettings.watermark_x_space = parseInt((page_width - defaultSettings.watermark_x - defaultSettings.watermark_width * defaultSettings.watermark_cols) / (defaultSettings.watermark_cols - 1));
}
//如果将水印行数设置为0,或水印行数设置过大,超过页面最大长度,则重新计算水印行数和水印y轴间隔
if (defaultSettings.watermark_rows == 0 || (parseInt(defaultSettings.watermark_y + defaultSettings.watermark_height * defaultSettings.watermark_rows + defaultSettings.watermark_y_space * (defaultSettings.watermark_rows - 1)) > page_height)) {
defaultSettings.watermark_rows = parseInt((defaultSettings.watermark_y_space + page_height - defaultSettings.watermark_y) / (defaultSettings.watermark_height + defaultSettings.watermark_y_space));
defaultSettings.watermark_y_space = parseInt(((page_height - defaultSettings.watermark_y) - defaultSettings.watermark_height * defaultSettings.watermark_rows) / (defaultSettings.watermark_rows - 1));
}
var x;
var y;
for (var i = 0; i < defaultSettings.watermark_rows; i++) {
y = defaultSettings.watermark_y + (defaultSettings.watermark_y_space + defaultSettings.watermark_height) * i;
for (var j = 0; j < defaultSettings.watermark_cols; j++) {
x = defaultSettings.watermark_x + (defaultSettings.watermark_width + defaultSettings.watermark_x_space) * j;
var mask_div = document.createElement('div');
mask_div.id = 'mask_div' + i + j;
mask_div.className = 'mask_div';
mask_div.appendChild(document.createTextNode(defaultSettings.watermark_txt));
//设置水印div倾斜显示
mask_div.style.webkitTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
mask_div.style.MozTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
mask_div.style.msTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
mask_div.style.OTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
mask_div.style.transform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
mask_div.style.visibility = "";
mask_div.style.position = "absolute";
mask_div.style.left = x + 'px';
mask_div.style.top = y + 'px';
mask_div.style.overflow = "hidden";
mask_div.style.zIndex = "9999";
//让水印不遮挡页面的点击事件
mask_div.style.pointerEvents = 'none';
mask_div.style.opacity = defaultSettings.watermark_alpha;
mask_div.style.fontSize = defaultSettings.watermark_fontsize;
mask_div.style.fontFamily = defaultSettings.watermark_font;
mask_div.style.color = defaultSettings.watermark_color;
mask_div.style.textAlign = "center";
mask_div.style.width = defaultSettings.watermark_width + 'px';
mask_div.style.height = defaultSettings.watermark_height + 'px';
mask_div.style.display = "block";
oTemp.appendChild(mask_div);
};
};
document.body.appendChild(oTemp);
}
function getNow() {
var d = new Date();
var year = d.getFullYear();
var month = change(d.getMonth() + 1);
var day = change(d.getDate());
var hour = change(d.getHours());
var minute = change(d.getMinutes());
var second = change(d.getSeconds());
function change(t) {
if (t < 10) {
return "0" + t;
} else {
return t;
}
}
var time = year + '年' + month + '月' + day + '日 ' + hour + '时' + minute + '分' + second + '秒';
return time;
} | 55.02 | 247 | 0.647946 |
83cc86d71a2292a1e3daaee3269b3492de43977b | 456 | js | JavaScript | server/models/Profile.js | IvyJean/my-portfolio | c29dd71b3c9fd5d763f711f052e5a41bb60f6a0e | [
"MIT"
] | null | null | null | server/models/Profile.js | IvyJean/my-portfolio | c29dd71b3c9fd5d763f711f052e5a41bb60f6a0e | [
"MIT"
] | null | null | null | server/models/Profile.js | IvyJean/my-portfolio | c29dd71b3c9fd5d763f711f052e5a41bb60f6a0e | [
"MIT"
] | null | null | null | const mongoose = require('mongoose')
const ProfileSchema = mongoose.Schema({
title: String,
subTitle: String,
description: String,
introduction: String,
technologies: [String],
company: [{
name: String,
position: String,
tenure: String,
description: String,
}],
projects: [{
name: String,
description: String,
tag: [String],
url: [String],
}]
})
module.exports = mongoose.model('Profile', ProfileSchema); | 19.826087 | 58 | 0.651316 |
83cd4e986a4c630bf068630317446ae48a79adc0 | 1,634 | js | JavaScript | api/util/swagger.js | bdinsmor/softball | b3a5fc8f5643c7744066482ee7690f16bb27e633 | [
"Apache-2.0"
] | null | null | null | api/util/swagger.js | bdinsmor/softball | b3a5fc8f5643c7744066482ee7690f16bb27e633 | [
"Apache-2.0"
] | null | null | null | api/util/swagger.js | bdinsmor/softball | b3a5fc8f5643c7744066482ee7690f16bb27e633 | [
"Apache-2.0"
] | null | null | null | 'use strict';
var rfr = require('rfr');
var logger = rfr('util/logger');
var path = require('path');
var fs = require('fs-extra');
var spawn = require('child_process').spawn;
let swaggerDir = path.join(__dirname,'..','swagger');
let apiSdkDir = path.join(swaggerDir,'generated');
let appSdkDir = path.join(__dirname,'..','..','app','src','services','recipes-sdk');
function createSdk() {
// Create generated directory if it does not exist
if (fs.existsSync(apiSdkDir)) {
fs.removeSync(apiSdkDir);
fs.mkdirSync(apiSdkDir);
} else {
fs.mkdirSync(apiSdkDir);
}
return new Promise((resolve, reject) => {
// Run Swagger codegen locally to generate SDK files
let cmd = spawn('swagger-codegen', ['generate', '-i', swaggerDir + '/RecipesAPI-exported.yml', '-l', 'typescript-angular2', '-o', apiSdkDir]);
cmd.stdout.on('data', data => {
process.stdout.write(data);
});
cmd.stderr.on('data', data => {
process.stderr.write(data);
});
cmd.on('exit', code => {
if (code) {
reject(new Error(`Finished with exit code ${code}`));
return;
}
resolve('Generated SDK successfully');
});
}).then(() => {
// Clear any existing files from app SDK directory
fs.removeSync(appSdkDir);
fs.mkdirSync(appSdkDir);
// Copy SDK from temporary generated directory
fs.copySync(apiSdkDir,appSdkDir);
logger.info('Successfully generated Angular2/TypeScript SDK at', appSdkDir);
// Delete temporary generated SDK folder
fs.removeSync(apiSdkDir);
return 'Successfully generated SDK';
});
}
module.exports = {
createSdk
};
| 29.709091 | 146 | 0.643819 |
83cd5085c27d4a08fe5d81ac6e9053a510ecf21c | 534 | js | JavaScript | packages/material-ui-icons/lib/PublishedWithChangesSharp.js | lily-white/lingdang | 6518604de4cd28c583a3c06deca3b8862e579c17 | [
"MIT"
] | 5 | 2021-08-28T03:45:26.000Z | 2021-08-29T04:28:45.000Z | packages/material-ui-icons/lib/PublishedWithChangesSharp.js | lily-white/lingdang | 6518604de4cd28c583a3c06deca3b8862e579c17 | [
"MIT"
] | null | null | null | packages/material-ui-icons/lib/PublishedWithChangesSharp.js | lily-white/lingdang | 6518604de4cd28c583a3c06deca3b8862e579c17 | [
"MIT"
] | 1 | 2021-07-05T14:28:27.000Z | 2021-07-05T14:28:27.000Z | import createSvgIcon from './utils/createSvgIcon.js';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "m17.66 9.53-7.07 7.07-4.24-4.24 1.41-1.41 2.83 2.83 5.66-5.66 1.41 1.41zM4 12c0-2.33 1.02-4.42 2.62-5.88L9 8.5v-6H3l2.2 2.2C3.24 6.52 2 9.11 2 12c0 5.19 3.95 9.45 9 9.95v-2.02c-3.94-.49-7-3.86-7-7.93zm18 0c0-5.19-3.95-9.45-9-9.95v2.02c3.94.49 7 3.86 7 7.93 0 2.33-1.02 4.42-2.62 5.88L15 15.5v6h6l-2.2-2.2c1.96-1.82 3.2-4.41 3.2-7.3z"
}), 'PublishedWithChangesSharp'); | 106.8 | 339 | 0.668539 |
83ce467d77aa763498ad25f2cbb4985ed5fd1b3f | 102 | js | JavaScript | tests/setupImageSnapshots.js | tim-mccurrach/maths2Clipboard | 9842cd3b20c979dd575bbe8812ad620a0a85b2a5 | [
"BSD-3-Clause"
] | 3 | 2017-12-15T12:14:10.000Z | 2018-05-16T20:13:53.000Z | tests/setupImageSnapshots.js | tim-mccurrach/maths2Clipboard | 9842cd3b20c979dd575bbe8812ad620a0a85b2a5 | [
"BSD-3-Clause"
] | 1 | 2020-01-28T08:12:10.000Z | 2020-01-28T08:12:10.000Z | tests/setupImageSnapshots.js | tim-mccurrach/maths2Clipboard | 9842cd3b20c979dd575bbe8812ad620a0a85b2a5 | [
"BSD-3-Clause"
] | 1 | 2018-08-09T13:47:38.000Z | 2018-08-09T13:47:38.000Z | import { toMatchImageSnapshot } from "jest-image-snapshot";
expect.extend({ toMatchImageSnapshot });
| 25.5 | 59 | 0.77451 |
83ce6b2b5ac869cd88dddc7a77742a1e963c4979 | 660 | js | JavaScript | lib/umi-plugin-vue-sfc/index.js | linglingqi102/umi-plugin-vue | b85fab334b6d54c2f44a54f148f5e32d9ba5bff1 | [
"MIT"
] | null | null | null | lib/umi-plugin-vue-sfc/index.js | linglingqi102/umi-plugin-vue | b85fab334b6d54c2f44a54f148f5e32d9ba5bff1 | [
"MIT"
] | null | null | null | lib/umi-plugin-vue-sfc/index.js | linglingqi102/umi-plugin-vue | b85fab334b6d54c2f44a54f148f5e32d9ba5bff1 | [
"MIT"
] | null | null | null | module.exports = (api, opts = {}) => {
const { vueLoaderOptions = {} } = opts
api.chainWebpack(config => {
const rule = config.module
.rule('vue')
.test(/\.vue$/)
rule
.use('vue-loader')
.loader('vue-loader')
.options(Object.assign(vueLoaderOptions, {
compilerOptions: {
preserveWhitespace: true
}
}))
config
.resolve
.extensions
.merge(['.vue'])
config
.plugin('vue-loader')
.use(require('vue-loader').VueLoaderPlugin)
})
api.modifyDefaultConfig(memo => {
return Object.assign(memo, {
urlLoaderExcludes: [/\.vue$/]
})
})
}
| 20 | 49 | 0.542424 |
83ce7cd6f237563191df8507a9dcff44e98ccce1 | 85,083 | js | JavaScript | dist/react-leaflet-measure.js | t0mk/react-leaflet-measure | 3db45aae591c6adca680615ad47599e13de750cf | [
"MIT"
] | null | null | null | dist/react-leaflet-measure.js | t0mk/react-leaflet-measure | 3db45aae591c6adca680615ad47599e13de750cf | [
"MIT"
] | null | null | null | dist/react-leaflet-measure.js | t0mk/react-leaflet-measure | 3db45aae591c6adca680615ad47599e13de750cf | [
"MIT"
] | null | null | null | (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("leaflet"), require("react-leaflet"));
else if(typeof define === 'function' && define.amd)
define([, ], factory);
else if(typeof exports === 'object')
exports["react-leaflet-measure"] = factory(require("leaflet"), require("react-leaflet"));
else
root["ReactLeafletMeasure"] = factory(root["L"], root["ReactLeaflet"]);
})(window, function(__WEBPACK_EXTERNAL_MODULE_leaflet__, __WEBPACK_EXTERNAL_MODULE_react_leaflet__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./src/index.js");
/******/ })
/************************************************************************/
/******/ ({
/***/ "./node_modules/css-loader/dist/cjs.js!./src/leaflet-measure.css":
/*!***********************************************************************!*\
!*** ./node_modules/css-loader/dist/cjs.js!./src/leaflet-measure.css ***!
\***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("exports = module.exports = __webpack_require__(/*! ../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.i, \".leaflet-control-measure h3,\\r\\n.leaflet-measure-resultpopup h3 {\\r\\n margin: 0 0 12px;\\r\\n padding-bottom: 10px;\\r\\n border-bottom: 1px solid #ddd\\r\\n}\\r\\n\\r\\n.leaflet-control-measure p,\\r\\n.leaflet-measure-resultpopup p {\\r\\n margin: 10px 0 0;\\r\\n line-height: 1.5em\\r\\n}\\r\\n\\r\\n.leaflet-control-measure p:first-child,\\r\\n.leaflet-measure-resultpopup p:first-child {\\r\\n margin-top: 0\\r\\n}\\r\\n\\r\\n.leaflet-control-measure .tasks,\\r\\n.leaflet-measure-resultpopup .tasks {\\r\\n margin: 12px 0 0;\\r\\n padding: 10px 0 0;\\r\\n border-top: 1px solid #ddd;\\r\\n text-align: right;\\r\\n list-style: none;\\r\\n list-style-image: none\\r\\n}\\r\\n\\r\\n.leaflet-control-measure .tasks li,\\r\\n.leaflet-measure-resultpopup .tasks li {\\r\\n display: inline;\\r\\n margin: 0 10px 0 0\\r\\n}\\r\\n\\r\\n.leaflet-control-measure .tasks li:last-child,\\r\\n.leaflet-measure-resultpopup .tasks li:last-child {\\r\\n margin-right: 0\\r\\n}\\r\\n\\r\\n.leaflet-control-measure .coorddivider,\\r\\n.leaflet-measure-resultpopup .coorddivider {\\r\\n color: #999\\r\\n}\\r\\n\\r\\n.leaflet-control-measure {\\r\\n max-width: 280px;\\r\\n background: #fff\\r\\n}\\r\\n\\r\\n/* assets/rulers.png */\\r\\n.leaflet-control-measure .leaflet-control-measure-toggle,\\r\\n.leaflet-control-measure .leaflet-control-measure-toggle:hover {\\r\\n background-size: 14px 14px;\\r\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAGJJREFUOI1jYGBgOM3AwPAfCTMwMDA8QxPDhT8xoAlIM5AG/jMi2QoDjKQYwITEkSFRM9w2qrkA5oqBc8EIDYNHDAzkp0I4QE/fMDF5YvnoBsiTwscWBiQBJgYGhpMU6D8CAJDrOVecOVsbAAAAAElFTkSuQmCC');\\r\\n border: 0;\\r\\n border-radius: 4px;\\r\\n text-indent: 100%;\\r\\n white-space: nowrap;\\r\\n overflow: hidden\\r\\n}\\r\\n\\r\\n.leaflet-touch .leaflet-control-measure .leaflet-control-measure-toggle,\\r\\n.leaflet-touch .leaflet-control-measure .leaflet-control-measure-toggle:hover {\\r\\n border-radius: 2px\\r\\n}\\r\\n\\r\\n/* assets/rulers_@2X.png */\\r\\n.leaflet-retina .leaflet-control-measure .leaflet-control-measure-toggle,\\r\\n.leaflet-retina .leaflet-control-measure .leaflet-control-measure-toggle:hover {\\r\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAALdJREFUWIXtl0EKwkAMRZ+iR1LwCC5ceekKHsSqN3ARF5pFi41lmGQU8iDQkkB/0k/aATgCV0AmQjkbNaXRAdy+FCmdgwDBSGzwRQBZGgUrZwEALBiOearGAwGwJhDCJwFbXl1rhAsIefdKesASoF5oJiD3QAi5B9IDuQeaeyDU8SNOwEOVRP4LDvirPSAe9yXd7oB1rXzJBKrm50ygasdj5kzAlZ/4FtwbPr8HOLwvPE6+VlyA/ROEjYEpRhLQZgAAAABJRU5ErkJggg==');\\r\\n}\\r\\n\\r\\n.leaflet-touch .leaflet-control-measure .leaflet-control-measure-toggle,\\r\\n.leaflet-touch .leaflet-control-measure .leaflet-control-measure-toggle:hover {\\r\\n background-size: 16px 16px\\r\\n}\\r\\n\\r\\n.leaflet-control-measure .startprompt h3 {\\r\\n margin-bottom: 10px\\r\\n}\\r\\n\\r\\n.leaflet-control-measure .startprompt .tasks {\\r\\n margin-top: 0;\\r\\n padding-top: 0;\\r\\n border-top: 0;\\r\\n text-align: left\\r\\n}\\r\\n\\r\\n.leaflet-control-measure .leaflet-control-measure-interaction {\\r\\n padding: 10px 12px\\r\\n}\\r\\n\\r\\n.leaflet-control-measure .results .group {\\r\\n margin-top: 10px;\\r\\n padding-top: 10px;\\r\\n border-top: 1px dotted #eaeaea\\r\\n}\\r\\n\\r\\n.leaflet-control-measure .results .group:first-child {\\r\\n margin-top: 0;\\r\\n padding-top: 0;\\r\\n border-top: 0\\r\\n}\\r\\n\\r\\n.leaflet-control-measure .results .heading {\\r\\n margin-right: 5px;\\r\\n color: #999\\r\\n}\\r\\n\\r\\n/* assets/start.png */\\r\\n.leaflet-control-measure a.start {\\r\\n display: inline;\\r\\n width: auto;\\r\\n height: auto;\\r\\n padding-left: 20px;\\r\\n margin-right: 4px;\\r\\n line-height: 1em;\\r\\n border: 0;\\r\\n text-align: left;\\r\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAY1JREFUKJF9kL9PEwEcxd/3y+XaXrwKCZsx4uLQiQQRZHOUmYEU45mL1CCVpH+JwxEx6CB6HfixM7KQ8sM2TB2cHHRzMCTt2cbe+zrUSxsHP+PLey/v+xX8ZaXWKHgddxNAmcYSACjQNpW69jtv9vYe9QBAAKActu44TnpMwlXRyEQuhzW2IMAWgcSZ4OMPOw++yUqtUfC6TgvEl8QflI9eL/3CGJVK0+uB+4TencoV59TruJsk3MwcvLiaCZ635rLA7u79hIm7qqR/3bt+qQDKKhplzTROm6aNp+ufq1kojme7prpNsTWlsTTanKEuRKIn683DtVfnxeGxcqHUkuI/iBj/1RwF2gZbAHCWiST7KlL79G5+Z2TlQwBtNZW6AFuVStMDgHSAHxOwxY9j5jA89QGpQiSWIDjJpzm/qeBXJu5qHM92xyeE4an/W3MHgN2aLEzOCwA827i8PUj1WEnfVLcFcjGaIVUjfxJcrr9f/C5ZUxCc5M29sTF8nZaGqrUhEt/MF99G0b0+APwB15Gn8fy9beQAAAAASUVORK5CYII=');\\r\\n background-repeat: no-repeat;\\r\\n background-position: 0 50%;\\r\\n background-size: 12px 12px;\\r\\n color: #5e66cc;\\r\\n text-decoration: none\\r\\n}\\r\\n\\r\\n.leaflet-control-measure a.start,\\r\\n.leaflet-control-measure a.start:hover {\\r\\n background-color: transparent\\r\\n}\\r\\n\\r\\n/* assets/start_@2X.png */\\r\\n.leaflet-retina .leaflet-control-measure a.start {\\r\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAA41JREFUSImNlU9oVFcUxn/ne28UxKWIRKiYpRaqZpIUagm6aZfiQlLNRBzyT+nGNmiLe2nUtkLBJhnRxolRoVBc1GXqIoqZTEoW6sZN/VNqTXdWsJl553YxkzSkM5N8m/feved837mP891jNMCx44XmJFEnsA/3nQ6bAEzMG3pMYNIU3Rgb2f1bPQ6rtdjV82A7Fp8j+EFJalSEu7vJfkzKOjVxpeXpqgKZ3kImBIYlbagSlGS6G2Aa+APAjCag3d07JKWqUm/M1T92OX29rkB338xpsK8AHN5aCN/E5eji1at75muedGBus8oLJx1OSloPEEIYzOdav/6fQKa3kDHTNYDg4YlH0YHrI3seN/o9/wkV3rVEt81oroocyedaJ5YEunoebAc9lLQheHgS4tTe8eFdr9ZCvoijJ6a3eCm6Z0Yz7n8HaWd+NP1MAFI8JGmDw1uPogMrybPZ2SYINRtiEWOX2l8G6SD4AtJGgyEAO3a80Fwq8USSQghn87nWMyuTM30zA0Y4UEJdN0bTfzUS6u4pXED63N3dPWpWkqhTkty9FJeji/VT9VHkYe5IT/HDRgK2LlwAEkmKY+8UsA9Aprv1umVJQrY1Er909xa/rPfLxi61vwSmANzDfuG+E6Da52tBhHE201O880lfcVPNiBAKlYK0Q4v2p2qitcJkH0ce5jJ9xb01dn+vPH1zw2tgNUgWVo0xMQ9L9l87AndCKtmVH01P1djcWqV/FRt6DJW7ZU3ETtktnBnPpc9D7RN4oF0G4I9EYBLA3Tu6BuY2N+QOPHfzjvFc67l65NnsbJNkH1TibVKm6Ia7u6SUygsn65EH959tXbJ7PNd2v1ERpTgMAhGQmNlNA8j0zdwy7JC7/0NMeny47eHypKMnpreMXWr7s17Vi8gMFHaHMtOSUrhPXLvcdkQASVmnwN9IWm+Jbh89Mb1leWLFPI3Js9nZJnN+kpRyeJ3gpwEEMHGl5am5+gHMaPZSdK+r/9f3GhGurLwcJ/dB2wAM671++f0Xlfdl6O4tDmKcr3z5As53ti5cqNq/ZtWlOAwG90+XJlsIn13LtX67GFNjZM4cthBGkDZWlxJgqmL/RYeGrR5or3ZLBODw2rDe/GjLreV8NS+sTF/xHYMhdz+02tAHEtxvKcUXP3zf9nzlZsMhcjg7uy2OvdM97Je0A7zqE70Cf+TBJs3sZn40/awex78erYTTwi3/3gAAAABJRU5ErkJggg==');\\r\\n}\\r\\n\\r\\n.leaflet-control-measure a.start:hover {\\r\\n opacity: .5;\\r\\n text-decoration: none\\r\\n}\\r\\n\\r\\n/* assets/cancel.png */\\r\\n.leaflet-control-measure a.cancel {\\r\\n display: inline;\\r\\n width: auto;\\r\\n height: auto;\\r\\n padding-left: 20px;\\r\\n margin-right: 4px;\\r\\n line-height: 1em;\\r\\n border: 0;\\r\\n text-align: left;\\r\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAS9JREFUKJGFkDFOAlEURc8dRphJFNmBHYnQYbTHDnsa0BDBRq1YC4naIQbWYEloqKQyswIXQEgwDIn5z2IATUR95X/nvpz7xWqq7XEYztO3QM2wAoCkyLCBt5zf9XrlGEAAtebkwPfdM+iQLWMQpVKu8nh/8qZqexyG7zuT3+DvoVwme+QlGmtYTcMGG8h4MnOtlUpxFs9ufKD2BbjTULqMwZlhobhaoO5mL+q+YQUlVZB0HoMF0EKwwLpC9XVApoL3w9UwgOk00LYuvqQIKK2dEw3rBrmFhSR6wMXqXOQbNhAqJQ9utECJhiAGc7KRZ1oF1FejMQxcZu9FUPznW19zmeyx1+uV41TKVQyiv2DnPs46nfxyU6zRGAaW3r02UZepsHYG9feD7EOnk18CfAKwIX1qvqPBeQAAAABJRU5ErkJggg==');\\r\\n background-repeat: no-repeat;\\r\\n background-position: 0 50%;\\r\\n background-size: 12px 12px;\\r\\n color: #5e66cc;\\r\\n text-decoration: none\\r\\n}\\r\\n\\r\\n.leaflet-control-measure a.cancel,\\r\\n.leaflet-control-measure a.cancel:hover {\\r\\n background-color: transparent\\r\\n}\\r\\n\\r\\n/* assets/cancel_@2X.png */\\r\\n.leaflet-retina .leaflet-control-measure a.cancel {\\r\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAApxJREFUSImtlr1PWlEYxp/ncE1KYWy6Gh3FwUZiOtiYuqlbGwxRaKJRjI5tqon/gf4BpqIxERC1doaNxLaD8SNxUOdqOukoiLHc83YALdwPhLbP+J5zfs977n3OPZeoo7Hp/XbTVGEArwEEBHhWHpErgmcQ5Kg8m+vLL364MehUjEzstZHGIiBvSKp6TYiIBvHFLKnZ9Fr3+aMG0cn9KKg+EXhaD+xgVaDm1PpqcKO6WtPdu9jBHKkSzcMBgD5RSEVjhx9qqtWdkyrRPNguAUaT8WD6wSAysddGZZz8XedODpIXMpCMBy8UAChlLNjgInmIHgTwvQ5qtzxHCjVV0k9gAQDU2PR+u4i8ta4kVSix0pMtGk8GAPnmBNc3xlBipScLkZB9EzI8Mn7UqkxThZ2iKNDzoZkT/85SZ75oeActJrv6xhhKpboKoZkTP6jm7Q1SGYYOK5QPkYP4ylsqZiKRY9/OUmde37QMiMhXK9xbus0C6HUiCNivAAScDcom9P7KRCLHvlSqqyDFlsFG4QBAoIPR2OEdgRZ3E6C6awBoBF7Zw13dz8D/kALk6pE5Nc/8z4t3TVeVeKkInjUK95Zus95SMVMnXRbJqYIg1ygcQG+ddNmkBTlF5dkUEW031wvuaalNF1T51FpkktwiAERjB9sEhy0OBYiEKofILS27Qlmk4DNAn2UsnYgHRw0AMEtq1jD0UO0k+kBmXMD36qOwz7Z54Frr0hxQuQ/Sa93n1Jx6BNaEOLmx+vLngwEArK8GNyD4+M9skffJePf2g5V1PBo7HKHIMkh/U1zgGuBkNRywXJkAkIwH00IGAGw5pssuE0Da49EBKxxw+au418j4Uath6LCA/QQ6AHleWXYJyKkW5EhuJePBCzfGbyl+TiY9AObiAAAAAElFTkSuQmCC');\\r\\n}\\r\\n\\r\\n.leaflet-control-measure a.cancel:hover {\\r\\n opacity: .5;\\r\\n text-decoration: none\\r\\n}\\r\\n\\r\\n/* assets/check.png */\\r\\n.leaflet-control-measure a.finish {\\r\\n display: inline;\\r\\n width: auto;\\r\\n height: auto;\\r\\n padding-left: 20px;\\r\\n margin-right: 4px;\\r\\n line-height: 1em;\\r\\n border: 0;\\r\\n text-align: left;\\r\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAASVJREFUKJF1kDFLAgEYhp/37tQ7KPMftAnZZtjSkg2B7S5KHLRVk3O/IQiEakzQra2h0SannOR+QWuLYKF03teQwkHeO3483/e+7ydWanZGQTDLXwMtwyoAkiLDBs5idt/r1ecAAmhdjHc9L3kF7bFBBpHrJo2nh8MPNTujIPjKjbPg9FKpUDxw/mJkw2Y8G3wL9qfz6ZUDtLLP2l0gQiACMNF21gVX+kzDvnQzx14ENQCZKk7K+s39cSoGkzQMOkmbepIioCpxHOeW57l4ceR5/nITDBZ5hg2EqgBCt7FXyMXY6X8YQH2F4dBPCtvvgv3M8oDBpFQo1pxerz533aRhq09kwUkSn3W75YXWwzAc+pbfujTRlqmyzgzq7/jFx263vAD4BStdctyYQ7zEAAAAAElFTkSuQmCC');\\r\\n background-repeat: no-repeat;\\r\\n background-position: 0 50%;\\r\\n background-size: 12px 12px;\\r\\n color: #5e66cc;\\r\\n text-decoration: none\\r\\n}\\r\\n\\r\\n.leaflet-control-measure a.finish,\\r\\n.leaflet-control-measure a.finish:hover {\\r\\n background-color: transparent\\r\\n}\\r\\n\\r\\n/* assets/check_@2X.png */\\r\\n.leaflet-retina .leaflet-control-measure a.finish {\\r\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAlZJREFUSImllr9PU1EYhp/3tJMyGqIuBhYNnQyXhMRJNlcHg0AxIC3pqhFi4iCLCf4FtFaUFgok/AMmBldSqpOwuAhhghFx6r2fAwX641Jy6zu+57vP+30n5+Rc0UYTmXKv77th4CGQMLhxumJHQrsYm3Kx1aXs/d+XMRRmjk1t9Ujx92CPJbl2TZhZgNjwq26mtNi/d2VAMlVOIrcguNYOHBJ1okDTS3lvpd5t6G48vT0ruUJ0OICum2M5ma68bHDrO5dcITq4VQajxZxXOg8Ym9rqkYv/7KzzsAT7Y1KimPP2HYBz8fn/gRv8bTCkLsE8gCYy5d5qVb+uOi1ttOQH1Tcxxb8i7l4MYYHvu17n+264c7h97rnVP7mSHzxAZBqHkIvHg2HH6SXqEO49n5tT8CxduWdGqaUCDTkgERlt9qkeHhjfJG421wn63MX1b8F8waiGwXtve1NXwWvV3aF7b5At5LxHOHtaHxINfioHdtRq6gfICtmBjbOQTuCgQye02zpBsDCerkwB1EIeRIcD2I7GU5XXiHchixaI1HJ24OOZEw0Ogdmsk4utmlkQMp6c8SGZKk92Agd8SWsCSKa314WehNeZmektkIkABygVct6oA/CrbgbsJLxOkpiLAjc49oPqLNTeg9Ji/54CTUfo7goptZIfPDgPAFjKeysYr/6bbfaimOtfP49qXk+mKyMyyyJ1ReLCMShVD4emJxOgmPNKJiWAtfDT1SIfKMViQaIZDpf8VZxpZPL7nXg8GDY0JOgD6659dgi2ExibktaKOW//MsY/pXkXxnBJQFMAAAAASUVORK5CYII=');\\r\\n}\\r\\n\\r\\n.leaflet-control-measure a.finish:hover {\\r\\n opacity: .5;\\r\\n text-decoration: none\\r\\n}\\r\\n\\r\\n/* assets/focus.png */\\r\\n.leaflet-measure-resultpopup a.zoomto {\\r\\n display: inline;\\r\\n width: auto;\\r\\n height: auto;\\r\\n padding-left: 20px;\\r\\n margin-right: 4px;\\r\\n line-height: 1em;\\r\\n border: 0;\\r\\n text-align: left;\\r\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAOhJREFUKJGVkTFug0AQRd+sgBOkyT1MvxVdipQpbDcBrsExAq4iipQWpbvt1xeJlBNgsZPCYK1sJ1GmfX//PM3CP0cAXqrjQwqVqmbG4N7b3AFsa29DwIrIeILuo1t9GYAUKqD4pbiYMyQAqpoBrt/lTZyaN7l16RsguzwwBreENq/HZ0TfEFEVrfs2H2Iu17s3pf/E8CSTmCDs+93qMebm9gyiMomZJNyyRWlbe7s4q2itInvBgFJe8wQgBOxc4Po2H4Ahbo15craQESjWpW9++AeLcrgonaBLzw3ZPW+UQxrG9i77a74B+z5bQloZOFAAAAAASUVORK5CYII=');\\r\\n background-repeat: no-repeat;\\r\\n background-position: 0 50%;\\r\\n background-size: 12px 12px;\\r\\n color: #5e66cc;\\r\\n text-decoration: none\\r\\n}\\r\\n\\r\\n.leaflet-measure-resultpopup a.zoomto,\\r\\n.leaflet-measure-resultpopup a.zoomto:hover {\\r\\n background-color: transparent\\r\\n}\\r\\n\\r\\n/* assets/focus_@2X.png */\\r\\n.leaflet-retina .leaflet-measure-resultpopup a.zoomto {\\r\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAXBJREFUSIntlb8uBFEUxn/n7hAV1XoIpazYll5ETbays56AZ+AJGBJBoRPUotVsRCmeACsRiUQx636KRWbHnzvIavi6c/J95zvnzJ174R8BWDaozTdnMK1iNpzNbycV4x3U4qaysVALo76zNnbwknPddm+Lf61bK5snyeaibkan+Ecd55Hn1eKm8g12T9AD9NwgClNgtnE64uRXgAlDQhyb2eJWUjkPaYO7nm2cjpS8P8EYzOYFdw6qIZPgipz8CsYg0l4K5VLqhhEHBkMeloP6EAGYAEjNGrtJ5WZzc7TlS1EMYNLkjw0MCWAgda/rbKcPhY4xFPnI4hhj6jHy63MLZ3E7fbB+F6133O0oJA9PYLYouMOYdr591V/qu8RsCulW/nHpSwa1uKn8/bKVVM4dVAWHSPdI98C+5Ks7G+MXIX2h/+D5KE4X4X46QS/wu1eFUMuwcn6PRd+DZ1xlg9x7QB3p+nu9dop7rP4D/V/EE6UhikMKpx/oAAAAAElFTkSuQmCC');\\r\\n}\\r\\n\\r\\n.leaflet-measure-resultpopup a.zoomto:hover {\\r\\n opacity: .5;\\r\\n text-decoration: none\\r\\n}\\r\\n\\r\\n/* assets/trash.png */\\r\\n.leaflet-measure-resultpopup a.deletemarkup {\\r\\n display: inline;\\r\\n width: auto;\\r\\n height: auto;\\r\\n padding-left: 20px;\\r\\n margin-right: 4px;\\r\\n line-height: 1em;\\r\\n border: 0;\\r\\n text-align: left;\\r\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAMCAYAAAC0qUeeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAALlJREFUKJFjZEACcWmn5zMwMCbA+P///ZuzeI5ZKozPaF+/n4WBgYFB7gmfKiPj30PfeP/Irem3+h5SeIyT4yvLQxZGFuv7Eh/vMzAwMDDGpJz6wcTExM5AEPz7BbX+zH98ymDyTMiCsamnq7HRMICimJGRsQUbjVUxIUAvxf8ZqrDSSCoY49JO/UtLO8OFzbSkpCO8cSlnfjMwMDCwMDAw/mdgOD3nBwPDp7i0MxiK/0BsmMbAwMAAACl8PxDSJvyvAAAAAElFTkSuQmCC');\\r\\n background-repeat: no-repeat;\\r\\n background-position: 0 50%;\\r\\n background-size: 12px 12px;\\r\\n color: #5e66cc;\\r\\n text-decoration: none\\r\\n}\\r\\n\\r\\n.leaflet-measure-resultpopup a.deletemarkup,\\r\\n.leaflet-measure-resultpopup a.deletemarkup:hover {\\r\\n background-color: transparent\\r\\n}\\r\\n\\r\\n/* assets/trash_@2X.png */\\r\\n.leaflet-retina .leaflet-measure-resultpopup a.deletemarkup {\\r\\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAYCAYAAAD+vg1LAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAW5JREFUSIntlbtKA2EQhc8/axIVrUQFBRsRRLCL+gIRQeuAxbpNLq2laGklpLYxVkkh2lip4AsIZkmZRiy0sPCCoEYwlxmLJLLZi+wmYpXTnRnmm/mHYVfBQ+uJq/EwhfJQHANItWdZAFxWQfrRQfTZrZ68wGEtlIHCshMKNGK0EhLsedW7FDWn1bR7ACGImsllF26teSNVmIaSG2ZUVEQm8/tLLw5wPH6iPc6NtjWYehjaVkrtQnCey0bX3JobKfMMCqsQ7NxNvGesubHSkygjaX6CMOD1pM7EZRJCBUD9L7ECqv0YI22KkTalU5i93vMqutX/g/XkdVlPm29+vV19nh2JBoN43xN3qx64B3bK847B/CFEdd/eLzh3uDgcxNvVXIVYPvTi+lf5Xc4ay465DAAbieJsUKyRKM43EPzaijVXoYSlcEoKutKkZKTNoBM3MXRsAwMRrm5+aeERMMeIKNC1MDMrogvur221Yt/I6IasMWr/dwAAAABJRU5ErkJggg==');\\r\\n}\\r\\n\\r\\n.leaflet-measure-resultpopup a.deletemarkup:hover {\\r\\n opacity: .5;\\r\\n text-decoration: none\\r\\n}\", \"\"]);\n\n\n\n//# sourceURL=webpack://ReactLeafletMeasure/./src/leaflet-measure.css?./node_modules/css-loader/dist/cjs.js");
/***/ }),
/***/ "./node_modules/css-loader/dist/runtime/api.js":
/*!*****************************************************!*\
!*** ./node_modules/css-loader/dist/runtime/api.js ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return '@media ' + item[2] + '{' + content + '}';\n } else {\n return content;\n }\n }).join('');\n }; // import a list of modules into the list\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (i = 0; i < modules.length; i++) {\n var item = modules[i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || '';\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n return '/*# ' + data + ' */';\n}\n\n//# sourceURL=webpack://ReactLeafletMeasure/./node_modules/css-loader/dist/runtime/api.js?");
/***/ }),
/***/ "./node_modules/leaflet-measure/dist/leaflet-measure.js":
/*!**************************************************************!*\
!*** ./node_modules/leaflet-measure/dist/leaflet-measure.js ***!
\**************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,\"a\",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"/dist/\",t(t.s=28)}([function(e,t,r){function n(e){return null==e?void 0===e?u:a:l&&l in Object(e)?i(e):s(e)}var o=r(4),i=r(38),s=r(39),a=\"[object Null]\",u=\"[object Undefined]\",l=o?o.toStringTag:void 0;e.exports=n},function(e,t){function r(e){return null!=e&&\"object\"==typeof e}e.exports=r},function(e,t){function r(e){var t=typeof e;return null!=e&&(\"object\"==t||\"function\"==t)}e.exports=r},function(e,t,r){\"use strict\";function n(e,t,r){if(r=r||{},!h(r))throw new Error(\"options is invalid\");var n=r.bbox,o=r.id;if(void 0===e)throw new Error(\"geometry is required\");if(t&&t.constructor!==Object)throw new Error(\"properties must be an Object\");n&&d(n),o&&m(o);var i={type:\"Feature\"};return o&&(i.id=o),n&&(i.bbox=n),i.properties=t||{},i.geometry=e,i}function o(e,t,r){if(!e)throw new Error(\"coordinates is required\");if(!Array.isArray(e))throw new Error(\"coordinates must be an Array\");if(e.length<2)throw new Error(\"coordinates must be at least 2 numbers long\");if(!p(e[0])||!p(e[1]))throw new Error(\"coordinates must contain numbers\");return n({type:\"Point\",coordinates:e},t,r)}function i(e,t,r){if(!e)throw new Error(\"coordinates is required\");for(var o=0;o<e.length;o++){var i=e[o];if(i.length<4)throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");for(var s=0;s<i[i.length-1].length;s++){if(0===o&&0===s&&!p(i[0][0])||!p(i[0][1]))throw new Error(\"coordinates must contain numbers\");if(i[i.length-1][s]!==i[0][s])throw new Error(\"First and last Position are not equivalent.\")}}return n({type:\"Polygon\",coordinates:e},t,r)}function s(e,t,r){if(!e)throw new Error(\"coordinates is required\");if(e.length<2)throw new Error(\"coordinates must be an array of two or more positions\");if(!p(e[0][1])||!p(e[0][1]))throw new Error(\"coordinates must contain numbers\");return n({type:\"LineString\",coordinates:e},t,r)}function a(e,t,r){if(!e)throw new Error(\"coordinates is required\");return n({type:\"MultiLineString\",coordinates:e},t,r)}function u(e,t,r){if(!e)throw new Error(\"coordinates is required\");return n({type:\"MultiPoint\",coordinates:e},t,r)}function l(e,t,r){if(!e)throw new Error(\"coordinates is required\");return n({type:\"MultiPolygon\",coordinates:e},t,r)}function c(e,t){if(void 0===e||null===e)throw new Error(\"radians is required\");if(t&&\"string\"!=typeof t)throw new Error(\"units must be a string\");var r=y[t||\"kilometers\"];if(!r)throw new Error(t+\" units is invalid\");return e*r}function f(e){if(null===e||void 0===e)throw new Error(\"degrees is required\");return e%360*Math.PI/180}function p(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function h(e){return!!e&&e.constructor===Object}function d(e){if(!e)throw new Error(\"bbox is required\");if(!Array.isArray(e))throw new Error(\"bbox must be an Array\");if(4!==e.length&&6!==e.length)throw new Error(\"bbox must be an Array of 4 or 6 numbers\");e.forEach(function(e){if(!p(e))throw new Error(\"bbox must only contain numbers\")})}function m(e){if(!e)throw new Error(\"id is required\");if(-1===[\"string\",\"number\"].indexOf(typeof e))throw new Error(\"id must be a number or a string\")}r.d(t,\"b\",function(){return n}),r.d(t,\"f\",function(){return o}),r.d(t,\"e\",function(){return s}),r.d(t,\"g\",function(){return c}),r.d(t,\"a\",function(){return f}),r.d(t,\"c\",function(){return p}),r.d(t,\"d\",function(){return h});var y={meters:6371008.8,metres:6371008.8,millimeters:6371008800,millimetres:6371008800,centimeters:637100880,centimetres:637100880,kilometers:6371.0088,kilometres:6371.0088,miles:3958.761333810546,nauticalmiles:6371008.8/1852,inches:6371008.8*39.37,yards:6371008.8/1.0936,feet:20902260.511392,radians:1,degrees:6371008.8/111325}},function(e,t,r){var n=r(5),o=n.Symbol;e.exports=o},function(e,t,r){var n=r(11),o=\"object\"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function(\"return this\")();e.exports=i},function(e,t){function r(e,t){return e===t||e!==e&&t!==t}e.exports=r},function(e,t,r){function n(e){return null!=e&&i(e.length)&&!o(e)}var o=r(10),i=r(16);e.exports=n},function(e,t,r){function n(e,t,r){\"__proto__\"==t&&o?o(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var o=r(9);e.exports=n},function(e,t,r){var n=r(35),o=function(){try{var e=n(Object,\"defineProperty\");return e({},\"\",{}),e}catch(e){}}();e.exports=o},function(e,t,r){function n(e){if(!i(e))return!1;var t=o(e);return t==a||t==u||t==s||t==l}var o=r(0),i=r(2),s=\"[object AsyncFunction]\",a=\"[object Function]\",u=\"[object GeneratorFunction]\",l=\"[object Proxy]\";e.exports=n},function(e,t,r){(function(t){var r=\"object\"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(t,r(37))},function(e,t,r){function n(e,t){return s(i(e,t,o),e+\"\")}var o=r(13),i=r(45),s=r(46);e.exports=n},function(e,t){function r(e){return e}e.exports=r},function(e,t){function r(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}e.exports=r},function(e,t,r){function n(e,t,r){if(!a(r))return!1;var n=typeof t;return!!(\"number\"==n?i(r)&&s(t,r.length):\"string\"==n&&t in r)&&o(r[t],e)}var o=r(6),i=r(7),s=r(17),a=r(2);e.exports=n},function(e,t){function r(e){return\"number\"==typeof e&&e>-1&&e%1==0&&e<=n}var n=9007199254740991;e.exports=r},function(e,t){function r(e,t){var r=typeof e;return!!(t=null==t?n:t)&&(\"number\"==r||\"symbol\"!=r&&o.test(e))&&e>-1&&e%1==0&&e<t}var n=9007199254740991,o=/^(?:0|[1-9]\\d*)$/;e.exports=r},function(e,t,r){function n(e,t){var r=s(e),n=!r&&i(e),c=!r&&!n&&a(e),p=!r&&!n&&!c&&l(e),h=r||n||c||p,d=h?o(e.length,String):[],m=d.length;for(var y in e)!t&&!f.call(e,y)||h&&(\"length\"==y||c&&(\"offset\"==y||\"parent\"==y)||p&&(\"buffer\"==y||\"byteLength\"==y||\"byteOffset\"==y)||u(y,m))||d.push(y);return d}var o=r(51),i=r(52),s=r(19),a=r(54),u=r(17),l=r(56),c=Object.prototype,f=c.hasOwnProperty;e.exports=n},function(e,t){var r=Array.isArray;e.exports=r},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,\"loaded\",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,\"id\",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){function r(e){var t=e&&e.constructor;return e===(\"function\"==typeof t&&t.prototype||n)}var n=Object.prototype;e.exports=r},function(e,t,r){function n(e){if(!i(e))return!1;var t=o(e);return t==u||t==a||\"string\"==typeof e.message&&\"string\"==typeof e.name&&!s(e)}var o=r(0),i=r(1),s=r(63),a=\"[object DOMException]\",u=\"[object Error]\";e.exports=n},function(e,t){function r(e,t){return function(r){return e(t(r))}}e.exports=r},function(e,t){function r(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}e.exports=r},function(e,t){var r=/<%=([\\s\\S]+?)%>/g;e.exports=r},function(e,t,r){function n(e){return null==e?\"\":o(e)}var o=r(75);e.exports=n},function(e,t,r){\"use strict\";function n(e,t,r){if(null!==e)for(var o,i,s,a,u,l,c,f,p=0,h=0,d=e.type,m=\"FeatureCollection\"===d,y=\"Feature\"===d,v=m?e.features.length:1,g=0;g<v;g++){c=m?e.features[g].geometry:y?e.geometry:e,f=!!c&&\"GeometryCollection\"===c.type,u=f?c.geometries.length:1;for(var b=0;b<u;b++){var _=0,j=0;if(null!==(a=f?c.geometries[b]:c)){l=a.coordinates;var x=a.type;switch(p=!r||\"Polygon\"!==x&&\"MultiPolygon\"!==x?0:1,x){case null:break;case\"Point\":if(!1===t(l,h,g,_,j))return!1;h++,_++;break;case\"LineString\":case\"MultiPoint\":for(o=0;o<l.length;o++){if(!1===t(l[o],h,g,_,j))return!1;h++,\"MultiPoint\"===x&&_++}\"LineString\"===x&&_++;break;case\"Polygon\":case\"MultiLineString\":for(o=0;o<l.length;o++){for(i=0;i<l[o].length-p;i++){if(!1===t(l[o][i],h,g,_,j))return!1;h++}\"MultiLineString\"===x&&_++,\"Polygon\"===x&&j++}\"Polygon\"===x&&_++;break;case\"MultiPolygon\":for(o=0;o<l.length;o++){for(\"MultiPolygon\"===x&&(j=0),i=0;i<l[o].length;i++){for(s=0;s<l[o][i].length-p;s++){if(!1===t(l[o][i][s],h,g,_,j))return!1;h++}j++}_++}break;case\"GeometryCollection\":for(o=0;o<a.geometries.length;o++)if(!1===n(a.geometries[o],t,r))return!1;break;default:throw new Error(\"Unknown Geometry Type\")}}}}}function o(e,t){var r,n,o,i,s,a,u,l,c,f,p=0,h=\"FeatureCollection\"===e.type,d=\"Feature\"===e.type,m=h?e.features.length:1;for(r=0;r<m;r++){for(a=h?e.features[r].geometry:d?e.geometry:e,l=h?e.features[r].properties:d?e.properties:{},c=h?e.features[r].bbox:d?e.bbox:void 0,f=h?e.features[r].id:d?e.id:void 0,u=!!a&&\"GeometryCollection\"===a.type,s=u?a.geometries.length:1,o=0;o<s;o++)if(null!==(i=u?a.geometries[o]:a))switch(i.type){case\"Point\":case\"LineString\":case\"MultiPoint\":case\"Polygon\":case\"MultiLineString\":case\"MultiPolygon\":if(!1===t(i,p,l,c,f))return!1;break;case\"GeometryCollection\":for(n=0;n<i.geometries.length;n++)if(!1===t(i.geometries[n],p,l,c,f))return!1;break;default:throw new Error(\"Unknown Geometry Type\")}else if(!1===t(null,p,l,c,f))return!1;p++}}function i(e,t,r){var n=r;return o(e,function(e,o,i,s,a){n=0===o&&void 0===r?e:t(n,e,o,i,s,a)}),n}function s(e,t){o(e,function(e,r,n,o,i){var s=null===e?null:e.type;switch(s){case null:case\"Point\":case\"LineString\":case\"Polygon\":if(!1===t(Object(l.b)(e,n,{bbox:o,id:i}),r,0))return!1;return}var a;switch(s){case\"MultiPoint\":a=\"Point\";break;case\"MultiLineString\":a=\"LineString\";break;case\"MultiPolygon\":a=\"Polygon\"}for(var u=0;u<e.coordinates.length;u++){var c=e.coordinates[u],f={type:a,coordinates:c};if(!1===t(Object(l.b)(f,n),r,u))return!1}})}function a(e,t){s(e,function(e,r,o){var i=0;if(e.geometry){var s=e.geometry.type;if(\"Point\"!==s&&\"MultiPoint\"!==s){var a;return!1!==n(e,function(n,s,u,c,f){if(void 0===a)return void(a=n);var p=Object(l.e)([a,n],e.properties);if(!1===t(p,r,o,f,i))return!1;i++,a=n})&&void 0}}})}function u(e,t,r){var n=r,o=!1;return a(e,function(e,i,s,a,u){n=!1===o&&void 0===r?e:t(n,e,i,s,a,u),o=!0}),n}r.d(t,\"a\",function(){return i}),r.d(t,\"b\",function(){return u});var l=r(3)},function(e,t,r){e.exports=r(29)},function(e,t,r){\"use strict\";function n(e){return e&&e.__esModule?e:{default:e}}r(30);var o=r(31),i=n(o),s=r(79),a=n(s),u=r(80),l=n(u),c=r(85),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c),p=r(86),h=n(p),d=r(87),m=r(88),y={imports:{numberFormat:d.numberFormat},interpolate:/{{([\\s\\S]+?)}}/g},v=(0,i.default)(m.controlTemplate,y),g=(0,i.default)(m.resultsTemplate,y),b=(0,i.default)(m.pointPopupTemplate,y),_=(0,i.default)(m.linePopupTemplate,y),j=(0,i.default)(m.areaPopupTemplate,y);L.Control.Measure=L.Control.extend({_className:\"leaflet-control-measure\",options:{units:{},position:\"topright\",primaryLengthUnit:\"feet\",secondaryLengthUnit:\"miles\",primaryAreaUnit:\"akrů\",activeColor:\"#ABE67E\",completedColor:\"#C8F2BE\",captureZIndex:1e4,popupOptions:{className:\"leaflet-measure-resultpopup\",autoPanPadding:[10,10]}},initialize:function(e){L.setOptions(this,e);var t=this.options,r=t.activeColor,n=t.completedColor;this._symbols=new h.default({activeColor:r,completedColor:n}),this.options.units=L.extend({},a.default,this.options.units)},onAdd:function(e){return this._map=e,this._latlngs=[],this._initLayout(),e.on(\"click\",this._collapse,this),this._layer=L.layerGroup().addTo(e),this._container},onRemove:function(e){e.off(\"click\",this._collapse,this),e.removeLayer(this._layer)},_initLayout:function(){var e=this._className,t=this._container=L.DomUtil.create(\"div\",e+\" leaflet-bar\");t.innerHTML=v({model:{className:e}}),t.setAttribute(\"aria-haspopup\",!0),L.DomEvent.disableClickPropagation(t),L.DomEvent.disableScrollPropagation(t);var r=this.$toggle=(0,c.selectOne)(\".js-toggle\",t);this.$interaction=(0,c.selectOne)(\".js-interaction\",t);var n=(0,c.selectOne)(\".js-start\",t),o=(0,c.selectOne)(\".js-cancel\",t),i=(0,c.selectOne)(\".js-finish\",t);this.$startPrompt=(0,c.selectOne)(\".js-startprompt\",t),this.$measuringPrompt=(0,c.selectOne)(\".js-measuringprompt\",t),this.$startHelp=(0,c.selectOne)(\".js-starthelp\",t),this.$results=(0,c.selectOne)(\".js-results\",t),this.$measureTasks=(0,c.selectOne)(\".js-measuretasks\",t),this._collapse(),this._updateMeasureNotStarted(),L.Browser.android||(L.DomEvent.on(t,\"mouseenter\",this._expand,this),L.DomEvent.on(t,\"mouseleave\",this._collapse,this)),L.DomEvent.on(r,\"click\",L.DomEvent.stop),L.Browser.touch?L.DomEvent.on(r,\"click\",this._expand,this):L.DomEvent.on(r,\"focus\",this._expand,this),L.DomEvent.on(n,\"click\",L.DomEvent.stop),L.DomEvent.on(n,\"click\",this._startMeasure,this),L.DomEvent.on(o,\"click\",L.DomEvent.stop),L.DomEvent.on(o,\"click\",this._finishMeasure,this),L.DomEvent.on(i,\"click\",L.DomEvent.stop),L.DomEvent.on(i,\"click\",this._handleMeasureDoubleClick,this)},_expand:function(){f.hide(this.$toggle),f.show(this.$interaction)},_collapse:function(){this._locked||(f.hide(this.$interaction),f.show(this.$toggle))},_updateMeasureNotStarted:function(){f.hide(this.$startHelp),f.hide(this.$results),f.hide(this.$measureTasks),f.hide(this.$measuringPrompt),f.show(this.$startPrompt)},_updateMeasureStartedNoPoints:function(){f.hide(this.$results),f.show(this.$startHelp),f.show(this.$measureTasks),f.hide(this.$startPrompt),f.show(this.$measuringPrompt)},_updateMeasureStartedWithPoints:function(){f.hide(this.$startHelp),f.show(this.$results),f.show(this.$measureTasks),f.hide(this.$startPrompt),f.show(this.$measuringPrompt)},_startMeasure:function(){this._locked=!0,this._measureVertexes=L.featureGroup().addTo(this._layer),this._captureMarker=L.marker(this._map.getCenter(),{clickable:!0,zIndexOffset:this.options.captureZIndex,opacity:0}).addTo(this._layer),this._setCaptureMarkerIcon(),this._captureMarker.on(\"mouseout\",this._handleMapMouseOut,this).on(\"dblclick\",this._handleMeasureDoubleClick,this).on(\"click\",this._handleMeasureClick,this),this._map.on(\"mousemove\",this._handleMeasureMove,this).on(\"mouseout\",this._handleMapMouseOut,this).on(\"move\",this._centerCaptureMarker,this).on(\"resize\",this._setCaptureMarkerIcon,this),L.DomEvent.on(this._container,\"mouseenter\",this._handleMapMouseOut,this),this._updateMeasureStartedNoPoints(),this._map.fire(\"measurestart\",null,!1)},_finishMeasure:function(){var e=L.extend({},this._resultsModel,{points:this._latlngs});this._locked=!1,L.DomEvent.off(this._container,\"mouseover\",this._handleMapMouseOut,this),this._clearMeasure(),this._captureMarker.off(\"mouseout\",this._handleMapMouseOut,this).off(\"dblclick\",this._handleMeasureDoubleClick,this).off(\"click\",this._handleMeasureClick,this),this._map.off(\"mousemove\",this._handleMeasureMove,this).off(\"mouseout\",this._handleMapMouseOut,this).off(\"move\",this._centerCaptureMarker,this).off(\"resize\",this._setCaptureMarkerIcon,this),this._layer.removeLayer(this._measureVertexes).removeLayer(this._captureMarker),this._measureVertexes=null,this._updateMeasureNotStarted(),this._collapse(),this._map.fire(\"measurefinish\",e,!1)},_clearMeasure:function(){this._latlngs=[],this._resultsModel=null,this._measureVertexes.clearLayers(),this._measureDrag&&this._layer.removeLayer(this._measureDrag),this._measureArea&&this._layer.removeLayer(this._measureArea),this._measureBoundary&&this._layer.removeLayer(this._measureBoundary),this._measureDrag=null,this._measureArea=null,this._measureBoundary=null},_centerCaptureMarker:function(){this._captureMarker.setLatLng(this._map.getCenter())},_setCaptureMarkerIcon:function(){this._captureMarker.setIcon(L.divIcon({iconSize:this._map.getSize().multiplyBy(2)}))},_getMeasurementDisplayStrings:function(e){function t(e,t,o,i,s){if(t&&n[t]){var a=r(e,n[t],i,s);if(o&&n[o]){a=a+\" (\"+r(e,n[o],i,s)+\")\"}return a}return r(e,null,i,s)}function r(e,t,r,n){var o={acres:\"Akrů\",feet:\"Feet\",kilometers:\"Kilometrů\",hectares:\"Hektarů\",meters:\"Metrů\",miles:\"Miles\",sqfeet:\"Sq Feet\",sqmeters:\"metrů čtverečních\",sqmiles:\"Sq Miles\"},i=L.extend({factor:1,decimals:0},t);return[(0,d.numberFormat)(e*i.factor,i.decimals,r||\".\",n||\",\"),o[i.display]||i.display].join(\" \")}var n=this.options.units;return{lengthDisplay:t(e.length,this.options.primaryLengthUnit,this.options.secondaryLengthUnit,this.options.decPoint,this.options.thousandsSep),areaDisplay:t(e.area,this.options.primaryAreaUnit,this.options.secondaryAreaUnit,this.options.decPoint,this.options.thousandsSep)}},_updateResults:function(){var e=(0,l.default)(this._latlngs),t=this._resultsModel=L.extend({},e,this._getMeasurementDisplayStrings(e),{pointCount:this._latlngs.length});this.$results.innerHTML=g({model:t})},_handleMeasureMove:function(e){this._measureDrag?this._measureDrag.setLatLng(e.latlng):this._measureDrag=L.circleMarker(e.latlng,this._symbols.getSymbol(\"measureDrag\")).addTo(this._layer),this._measureDrag.bringToFront()},_handleMeasureDoubleClick:function(){var e=this._latlngs,t=void 0,r=void 0;if(this._finishMeasure(),e.length){e.length>2&&e.push(e[0]);var n=(0,l.default)(e);1===e.length?(t=L.circleMarker(e[0],this._symbols.getSymbol(\"resultPoint\")),r=b({model:n})):2===e.length?(t=L.polyline(e,this._symbols.getSymbol(\"resultLine\")),r=_({model:L.extend({},n,this._getMeasurementDisplayStrings(n))})):(t=L.polygon(e,this._symbols.getSymbol(\"resultArea\")),r=j({model:L.extend({},n,this._getMeasurementDisplayStrings(n))}));var o=L.DomUtil.create(\"div\",\"\");o.innerHTML=r;var i=(0,c.selectOne)(\".js-zoomto\",o);i&&(L.DomEvent.on(i,\"click\",L.DomEvent.stop),L.DomEvent.on(i,\"click\",function(){t.getBounds?this._map.fitBounds(t.getBounds(),{padding:[20,20],maxZoom:17}):t.getLatLng&&this._map.panTo(t.getLatLng())},this));var s=(0,c.selectOne)(\".js-deletemarkup\",o);s&&(L.DomEvent.on(s,\"click\",L.DomEvent.stop),L.DomEvent.on(s,\"click\",function(){this._layer.removeLayer(t)},this)),t.addTo(this._layer),t.bindPopup(o,this.options.popupOptions),t.getBounds?t.openPopup(t.getBounds().getCenter()):t.getLatLng&&t.openPopup(t.getLatLng())}},_handleMeasureClick:function(e){var t=this._map.mouseEventToLatLng(e.originalEvent),r=this._latlngs[this._latlngs.length-1],n=this._symbols.getSymbol(\"measureVertex\");r&&t.equals(r)||(this._latlngs.push(t),this._addMeasureArea(this._latlngs),this._addMeasureBoundary(this._latlngs),this._measureVertexes.eachLayer(function(e){e.setStyle(n),e._path&&e._path.setAttribute(\"class\",n.className)}),this._addNewVertex(t),this._measureBoundary&&this._measureBoundary.bringToFront(),this._measureVertexes.bringToFront()),this._updateResults(),this._updateMeasureStartedWithPoints()},_handleMapMouseOut:function(){this._measureDrag&&(this._layer.removeLayer(this._measureDrag),this._measureDrag=null)},_addNewVertex:function(e){L.circleMarker(e,this._symbols.getSymbol(\"measureVertexActive\")).addTo(this._measureVertexes)},_addMeasureArea:function(e){if(e.length<3)return void(this._measureArea&&(this._layer.removeLayer(this._measureArea),this._measureArea=null));this._measureArea?this._measureArea.setLatLngs(e):this._measureArea=L.polygon(e,this._symbols.getSymbol(\"measureArea\")).addTo(this._layer)},_addMeasureBoundary:function(e){if(e.length<2)return void(this._measureBoundary&&(this._layer.removeLayer(this._measureBoundary),this._measureBoundary=null));this._measureBoundary?this._measureBoundary.setLatLngs(e):this._measureBoundary=L.polyline(e,this._symbols.getSymbol(\"measureBoundary\")).addTo(this._layer)}}),L.Map.mergeOptions({measureControl:!1}),L.Map.addInitHook(function(){this.options.measureControl&&(this.measureControl=(new L.Control.Measure).addTo(this))}),L.control.measure=function(e){return new L.Control.Measure(e)}},function(e,t){},function(e,t,r){function n(e,t,r){var n=h.imports._.templateSettings||h;r&&c(e,t,r)&&(t=void 0),e=d(e),t=o({},t,n,a);var j,x,M=o({},t.imports,n.imports,a),w=f(M),L=s(M,w),O=0,P=t.interpolate||b,k=\"__p += '\",C=RegExp((t.escape||b).source+\"|\"+P.source+\"|\"+(P===p?g:b).source+\"|\"+(t.evaluate||b).source+\"|$\",\"g\"),E=\"sourceURL\"in t?\"//# sourceURL=\"+t.sourceURL+\"\\n\":\"\";e.replace(C,function(t,r,n,o,i,s){return n||(n=o),k+=e.slice(O,s).replace(_,u),r&&(j=!0,k+=\"' +\\n__e(\"+r+\") +\\n'\"),i&&(x=!0,k+=\"';\\n\"+i+\";\\n__p += '\"),n&&(k+=\"' +\\n((__t = (\"+n+\")) == null ? '' : __t) +\\n'\"),O=s+t.length,t}),k+=\"';\\n\";var S=t.variable;S||(k=\"with (obj) {\\n\"+k+\"\\n}\\n\"),k=(x?k.replace(m,\"\"):k).replace(y,\"$1\").replace(v,\"$1;\"),k=\"function(\"+(S||\"obj\")+\") {\\n\"+(S?\"\":\"obj || (obj = {});\\n\")+\"var __t, __p = ''\"+(j?\", __e = _.escape\":\"\")+(x?\", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, '') }\\n\":\";\\n\")+k+\"return __p\\n}\";var A=i(function(){return Function(w,E+\"return \"+k).apply(void 0,L)});if(A.source=k,l(A))throw A;return A}var o=r(32),i=r(62),s=r(65),a=r(66),u=r(67),l=r(22),c=r(15),f=r(68),p=r(25),h=r(71),d=r(26),m=/\\b__p \\+= '';/g,y=/\\b(__p \\+=) '' \\+/g,v=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,g=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,b=/($^)/,_=/['\\n\\r\\u2028\\u2029\\\\]/g;e.exports=n},function(e,t,r){var n=r(33),o=r(44),i=r(50),s=o(function(e,t,r,o){n(t,i(t),e,o)});e.exports=s},function(e,t,r){function n(e,t,r,n){var s=!r;r||(r={});for(var a=-1,u=t.length;++a<u;){var l=t[a],c=n?n(r[l],e[l],l,r,e):void 0;void 0===c&&(c=e[l]),s?i(r,l,c):o(r,l,c)}return r}var o=r(34),i=r(8);e.exports=n},function(e,t,r){function n(e,t,r){var n=e[t];a.call(e,t)&&i(n,r)&&(void 0!==r||t in e)||o(e,t,r)}var o=r(8),i=r(6),s=Object.prototype,a=s.hasOwnProperty;e.exports=n},function(e,t,r){function n(e,t){var r=i(e,t);return o(r)?r:void 0}var o=r(36),i=r(43);e.exports=n},function(e,t,r){function n(e){return!(!s(e)||i(e))&&(o(e)?d:l).test(a(e))}var o=r(10),i=r(40),s=r(2),a=r(42),u=/[\\\\^$.*+?()[\\]{}|]/g,l=/^\\[object .+?Constructor\\]$/,c=Function.prototype,f=Object.prototype,p=c.toString,h=f.hasOwnProperty,d=RegExp(\"^\"+p.call(h).replace(u,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");e.exports=n},function(e,t){var r;r=function(){return this}();try{r=r||Function(\"return this\")()||(0,eval)(\"this\")}catch(e){\"object\"==typeof window&&(r=window)}e.exports=r},function(e,t,r){function n(e){var t=s.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[u]=r:delete e[u]),o}var o=r(4),i=Object.prototype,s=i.hasOwnProperty,a=i.toString,u=o?o.toStringTag:void 0;e.exports=n},function(e,t){function r(e){return o.call(e)}var n=Object.prototype,o=n.toString;e.exports=r},function(e,t,r){function n(e){return!!i&&i in e}var o=r(41),i=function(){var e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||\"\");return e?\"Symbol(src)_1.\"+e:\"\"}();e.exports=n},function(e,t,r){var n=r(5),o=n[\"__core-js_shared__\"];e.exports=o},function(e,t){function r(e){if(null!=e){try{return o.call(e)}catch(e){}try{return e+\"\"}catch(e){}}return\"\"}var n=Function.prototype,o=n.toString;e.exports=r},function(e,t){function r(e,t){return null==e?void 0:e[t]}e.exports=r},function(e,t,r){function n(e){return o(function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=e.length>3&&\"function\"==typeof s?(o--,s):void 0,a&&i(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),t=Object(t);++n<o;){var u=r[n];u&&e(t,u,n,s)}return t})}var o=r(12),i=r(15);e.exports=n},function(e,t,r){function n(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var n=arguments,s=-1,a=i(n.length-t,0),u=Array(a);++s<a;)u[s]=n[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=n[s];return l[t]=r(u),o(e,this,l)}}var o=r(14),i=Math.max;e.exports=n},function(e,t,r){var n=r(47),o=r(49),i=o(n);e.exports=i},function(e,t,r){var n=r(48),o=r(9),i=r(13),s=o?function(e,t){return o(e,\"toString\",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=s},function(e,t){function r(e){return function(){return e}}e.exports=r},function(e,t){function r(e){var t=0,r=0;return function(){var s=i(),a=o-(s-r);if(r=s,a>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var n=800,o=16,i=Date.now;e.exports=r},function(e,t,r){function n(e){return s(e)?o(e,!0):i(e)}var o=r(18),i=r(60),s=r(7);e.exports=n},function(e,t){function r(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}e.exports=r},function(e,t,r){var n=r(53),o=r(1),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return o(e)&&s.call(e,\"callee\")&&!a.call(e,\"callee\")};e.exports=u},function(e,t,r){function n(e){return i(e)&&o(e)==s}var o=r(0),i=r(1),s=\"[object Arguments]\";e.exports=n},function(e,t,r){(function(e){var n=r(5),o=r(55),i=\"object\"==typeof t&&t&&!t.nodeType&&t,s=i&&\"object\"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===i,u=a?n.Buffer:void 0,l=u?u.isBuffer:void 0,c=l||o;e.exports=c}).call(t,r(20)(e))},function(e,t){function r(){return!1}e.exports=r},function(e,t,r){var n=r(57),o=r(58),i=r(59),s=i&&i.isTypedArray,a=s?o(s):n;e.exports=a},function(e,t,r){function n(e){return s(e)&&i(e.length)&&!!a[o(e)]}var o=r(0),i=r(16),s=r(1),a={};a[\"[object Float32Array]\"]=a[\"[object Float64Array]\"]=a[\"[object Int8Array]\"]=a[\"[object Int16Array]\"]=a[\"[object Int32Array]\"]=a[\"[object Uint8Array]\"]=a[\"[object Uint8ClampedArray]\"]=a[\"[object Uint16Array]\"]=a[\"[object Uint32Array]\"]=!0,a[\"[object Arguments]\"]=a[\"[object Array]\"]=a[\"[object ArrayBuffer]\"]=a[\"[object Boolean]\"]=a[\"[object DataView]\"]=a[\"[object Date]\"]=a[\"[object Error]\"]=a[\"[object Function]\"]=a[\"[object Map]\"]=a[\"[object Number]\"]=a[\"[object Object]\"]=a[\"[object RegExp]\"]=a[\"[object Set]\"]=a[\"[object String]\"]=a[\"[object WeakMap]\"]=!1,e.exports=n},function(e,t){function r(e){return function(t){return e(t)}}e.exports=r},function(e,t,r){(function(e){var n=r(11),o=\"object\"==typeof t&&t&&!t.nodeType&&t,i=o&&\"object\"==typeof e&&e&&!e.nodeType&&e,s=i&&i.exports===o,a=s&&n.process,u=function(){try{return a&&a.binding&&a.binding(\"util\")}catch(e){}}();e.exports=u}).call(t,r(20)(e))},function(e,t,r){function n(e){if(!o(e))return s(e);var t=i(e),r=[];for(var n in e)(\"constructor\"!=n||!t&&u.call(e,n))&&r.push(n);return r}var o=r(2),i=r(21),s=r(61),a=Object.prototype,u=a.hasOwnProperty;e.exports=n},function(e,t){function r(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}e.exports=r},function(e,t,r){var n=r(14),o=r(12),i=r(22),s=o(function(e,t){try{return n(e,void 0,t)}catch(e){return i(e)?e:new Error(e)}});e.exports=s},function(e,t,r){function n(e){if(!s(e)||o(e)!=a)return!1;var t=i(e);if(null===t)return!0;var r=f.call(t,\"constructor\")&&t.constructor;return\"function\"==typeof r&&r instanceof r&&c.call(r)==p}var o=r(0),i=r(64),s=r(1),a=\"[object Object]\",u=Function.prototype,l=Object.prototype,c=u.toString,f=l.hasOwnProperty,p=c.call(Object);e.exports=n},function(e,t,r){var n=r(23),o=n(Object.getPrototypeOf,Object);e.exports=o},function(e,t,r){function n(e,t){return o(t,function(t){return e[t]})}var o=r(24);e.exports=n},function(e,t,r){function n(e,t,r,n){return void 0===e||o(e,i[r])&&!s.call(n,r)?t:e}var o=r(6),i=Object.prototype,s=i.hasOwnProperty;e.exports=n},function(e,t){function r(e){return\"\\\\\"+n[e]}var n={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"};e.exports=r},function(e,t,r){function n(e){return s(e)?o(e):i(e)}var o=r(18),i=r(69),s=r(7);e.exports=n},function(e,t,r){function n(e){if(!o(e))return i(e);var t=[];for(var r in Object(e))a.call(e,r)&&\"constructor\"!=r&&t.push(r);return t}var o=r(21),i=r(70),s=Object.prototype,a=s.hasOwnProperty;e.exports=n},function(e,t,r){var n=r(23),o=n(Object.keys,Object);e.exports=o},function(e,t,r){var n=r(72),o=r(77),i=r(78),s=r(25),a={escape:o,evaluate:i,interpolate:s,variable:\"\",imports:{_:{escape:n}}};e.exports=a},function(e,t,r){function n(e){return e=i(e),e&&a.test(e)?e.replace(s,o):e}var o=r(73),i=r(26),s=/[&<>\"']/g,a=RegExp(s.source);e.exports=n},function(e,t,r){var n=r(74),o={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"},i=n(o);e.exports=i},function(e,t){function r(e){return function(t){return null==e?void 0:e[t]}}e.exports=r},function(e,t,r){function n(e){if(\"string\"==typeof e)return e;if(s(e))return i(e,n)+\"\";if(a(e))return c?c.call(e):\"\";var t=e+\"\";return\"0\"==t&&1/e==-u?\"-0\":t}var o=r(4),i=r(24),s=r(19),a=r(76),u=1/0,l=o?o.prototype:void 0,c=l?l.toString:void 0;e.exports=n},function(e,t,r){function n(e){return\"symbol\"==typeof e||i(e)&&o(e)==s}var o=r(0),i=r(1),s=\"[object Symbol]\";e.exports=n},function(e,t){var r=/<%-([\\s\\S]+?)%>/g;e.exports=r},function(e,t){var r=/<%([\\s\\S]+?)%>/g;e.exports=r},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default={acres:{factor:24711e-8,display:\"akrů\",decimals:2},feet:{factor:3.2808,display:\"feet\",decimals:0},kilometers:{factor:.001,display:\"kilometers\",decimals:2},hectares:{factor:1e-4,display:\"hectares\",decimals:2},meters:{factor:1,display:\"meters\",decimals:0},miles:{factor:3.2808/5280,display:\"miles\",decimals:2},sqfeet:{factor:10.7639,display:\"sqfeet\",decimals:0},sqmeters:{factor:1,display:\"sqmeters\",decimals:0},sqmiles:{factor:3.86102e-7,display:\"sqmiles\",decimals:2}}},function(e,t,r){\"use strict\";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return e<10?\"0\"+e.toString():e.toString()}function i(e,t,r){var n=Math.abs(e),i=Math.floor(n),s=Math.floor(60*(n-i)),a=Math.round(3600*(n-i-s/60)*100)/100,u=n===e?t:r;return o(i)+\"° \"+o(s)+\"' \"+o(a)+'\" '+u}function s(e){var t=e[e.length-1],r=e.map(function(e){return[e.lat,e.lng]}),n=L.polyline(r),o=L.polygon(r),s=1e3*(0,u.default)(n.toGeoJSON(),{units:\"kilometers\"}),a=(0,c.default)(o.toGeoJSON());return{lastCoord:{dd:{x:t.lng,y:t.lat},dms:{x:i(t.lng,\"E\",\"W\"),y:i(t.lat,\"N\",\"S\")}},length:s,area:a}}Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=s;var a=r(81),u=n(a),l=r(84),c=n(l)},function(e,t,r){\"use strict\";function n(e,t){if(t=t||{},!Object(s.d)(t))throw new Error(\"options is invalid\");if(!e)throw new Error(\"geojson is required\");return Object(i.b)(e,function(e,r){var n=r.geometry.coordinates;return e+Object(o.a)(n[0],n[1],t)},0)}Object.defineProperty(t,\"__esModule\",{value:!0});var o=r(82),i=r(27),s=r(3);t.default=n},function(e,t,r){\"use strict\";function n(e,t,r){if(r=r||{},!Object(i.d)(r))throw new Error(\"options is invalid\");var n=r.units,s=Object(o.a)(e),a=Object(o.a)(t),u=Object(i.a)(a[1]-s[1]),l=Object(i.a)(a[0]-s[0]),c=Object(i.a)(s[1]),f=Object(i.a)(a[1]),p=Math.pow(Math.sin(u/2),2)+Math.pow(Math.sin(l/2),2)*Math.cos(c)*Math.cos(f);return Object(i.g)(2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p)),n)}var o=r(83),i=r(3);t.a=n},function(e,t,r){\"use strict\";function n(e){if(!e)throw new Error(\"coord is required\");if(\"Feature\"===e.type&&null!==e.geometry&&\"Point\"===e.geometry.type)return e.geometry.coordinates;if(\"Point\"===e.type)return e.coordinates;if(Array.isArray(e)&&e.length>=2&&void 0===e[0].length&&void 0===e[1].length)return e;throw new Error(\"coord must be GeoJSON Point or an Array of numbers\")}r.d(t,\"a\",function(){return n});r(3)},function(e,t,r){\"use strict\";function n(e){return Object(u.a)(e,function(e,t){return e+o(t)},0)}function o(e){var t,r=0;switch(e.type){case\"Polygon\":return i(e.coordinates);case\"MultiPolygon\":for(t=0;t<e.coordinates.length;t++)r+=i(e.coordinates[t]);return r;case\"Point\":case\"MultiPoint\":case\"LineString\":case\"MultiLineString\":return 0;case\"GeometryCollection\":for(t=0;t<e.geometries.length;t++)r+=o(e.geometries[t]);return r}}function i(e){var t=0;if(e&&e.length>0){t+=Math.abs(s(e[0]));for(var r=1;r<e.length;r++)t-=Math.abs(s(e[r]))}return t}function s(e){var t,r,n,o,i,s,u,c=0,f=e.length;if(f>2){for(u=0;u<f;u++)u===f-2?(o=f-2,i=f-1,s=0):u===f-1?(o=f-1,i=0,s=1):(o=u,i=u+1,s=u+2),t=e[o],r=e[i],n=e[s],c+=(a(n[0])-a(t[0]))*Math.sin(a(r[1]));c=c*l*l/2}return c}function a(e){return e*Math.PI/180}Object.defineProperty(t,\"__esModule\",{value:!0});var u=r(27),l=6378137;t.default=n},function(e,t,r){\"use strict\";function n(e,t){return t||(t=document),t.querySelector(e)}function o(e,t){return t||(t=document),Array.prototype.slice.call(t.querySelectorAll(e))}function i(e){if(e)return e.setAttribute(\"style\",\"display:none;\"),e}function s(e){if(e)return e.removeAttribute(\"style\"),e}Object.defineProperty(t,\"__esModule\",{value:!0}),t.selectOne=n,t.selectAll=o,t.hide=i,t.show=s},function(e,t,r){\"use strict\";function n(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}Object.defineProperty(t,\"__esModule\",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i={activeColor:\"#ABE67E\",completedColor:\"#C8F2BE\"},s=function(){function e(t){n(this,e),this._options=L.extend({},i,this._options,t)}return o(e,[{key:\"getSymbol\",value:function(e){return{measureDrag:{clickable:!1,radius:4,color:this._options.activeColor,weight:2,opacity:.7,fillColor:this._options.activeColor,fillOpacity:.5,className:\"layer-measuredrag\"},measureArea:{clickable:!1,stroke:!1,fillColor:this._options.activeColor,fillOpacity:.2,className:\"layer-measurearea\"},measureBoundary:{clickable:!1,color:this._options.activeColor,weight:2,opacity:.9,fill:!1,className:\"layer-measureboundary\"},measureVertex:{clickable:!1,radius:4,color:this._options.activeColor,weight:2,opacity:1,fillColor:this._options.activeColor,fillOpacity:.7,className:\"layer-measurevertex\"},measureVertexActive:{clickable:!1,radius:4,color:this._options.activeColor,weight:2,opacity:1,fillColor:this._options.activeColor,fillOpacity:1,className:\"layer-measurevertex active\"},resultArea:{clickable:!0,color:this._options.completedColor,weight:2,opacity:.9,fillColor:this._options.completedColor,fillOpacity:.2,className:\"layer-measure-resultarea\"},resultLine:{clickable:!0,color:this._options.completedColor,weight:3,opacity:.9,fill:!1,className:\"layer-measure-resultline\"},resultPoint:{clickable:!0,radius:4,color:this._options.completedColor,weight:2,opacity:1,fillColor:this._options.completedColor,fillOpacity:.7,className:\"layer-measure-resultpoint\"}}[e]}}]),e}();t.default=s},function(e,t,r){\"use strict\";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:\".\",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:\",\",o=e<0?\"-\":\"\",i=Math.abs(+e||0),s=parseInt(i.toFixed(t),10)+\"\",a=s.length>3?s.length%3:0;return[o,a?s.substr(0,a)+n:\"\",s.substr(a).replace(/(\\d{3})(?=\\d)/g,\"$1\"+n),t?\"\"+r+Math.abs(i-s).toFixed(t).slice(2):\"\"].join(\"\")}Object.defineProperty(t,\"__esModule\",{value:!0}),t.numberFormat=n},function(e,t,r){\"use strict\";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,\"__esModule\",{value:!0});var o=r(89);Object.defineProperty(t,\"controlTemplate\",{enumerable:!0,get:function(){return n(o).default}});var i=r(90);Object.defineProperty(t,\"resultsTemplate\",{enumerable:!0,get:function(){return n(i).default}});var s=r(91);Object.defineProperty(t,\"pointPopupTemplate\",{enumerable:!0,get:function(){return n(s).default}});var a=r(92);Object.defineProperty(t,\"linePopupTemplate\",{enumerable:!0,get:function(){return n(a).default}});var u=r(93);Object.defineProperty(t,\"areaPopupTemplate\",{enumerable:!0,get:function(){return n(u).default}})},function(e,t,r){e.exports='<a class=\"{{ model.className }}-toggle js-toggle\" href=# title=\"Spočítej vzdálenosti a plochy\">Measure</a> <div class=\"{{ model.className }}-interaction js-interaction\"> <div class=\"js-startprompt startprompt\"> <h3>Spočítej vzdálenosti a plochy</h3> <ul class=tasks> <a href=# class=\"js-start start\">Vytvoř nové měření</a> </ul> </div> <div class=js-measuringprompt> <h3>Spočítej vzdálenosti a plochy</h3> <p class=js-starthelp>Začni přidávat body do mapy</p> <div class=\"js-results results\"></div> <ul class=\"js-measuretasks tasks\"> <li><a href=# class=\"js-cancel cancel\">Zruš</a></li> <li><a href=# class=\"js-finish finish\">Ukonči měření</a></li> </ul> </div> </div> '},function(e,t,r){e.exports='<div class=group> <p class=\"lastpoint heading\">Poslední bod</p> <p>{{ model.lastCoord.dms.y }} <span class=coorddivider>/</span> {{ model.lastCoord.dms.x }}</p> <p>{{ numberFormat(model.lastCoord.dd.y, 6) }} <span class=coorddivider>/</span> {{ numberFormat(model.lastCoord.dd.x, 6) }}</p> </div> <% if (model.pointCount > 1) { %> <div class=group> <p><span class=heading>Délka cesty</span> {{ model.lengthDisplay }}</p> </div> <% } %> <% if (model.pointCount > 2) { %> <div class=group> <p><span class=heading>Obsah</span> {{ model.areaDisplay }}</p> </div> <% } %> '},function(e,t,r){e.exports='<h3>Lokalita bodu</h3> <p>{{ model.lastCoord.dms.y }} <span class=coorddivider>/</span> {{ model.lastCoord.dms.x }}</p> <p>{{ numberFormat(model.lastCoord.dd.y, 6) }} <span class=coorddivider>/</span> {{ numberFormat(model.lastCoord.dd.x, 6) }}</p> <ul class=tasks> <li><a href=# class=\"js-zoomto zoomto\">Priblíž k lokalite</a></li> <li><a href=# class=\"js-deletemarkup deletemarkup\">Zruš</a></li> </ul> '},function(e,t,r){e.exports='<h3>Vzdialenosť čiary</h3> <p>{{ model.lengthDisplay }}</p> <ul class=tasks> <li><a href=# class=\"js-zoomto zoomto\">Priblíž k čiare</a></li> <li><a href=# class=\"js-deletemarkup deletemarkup\">Zruš</a></li> </ul> '},function(e,t,r){e.exports='<h3>Výměra oblasti</h3> <p>{{ model.areaDisplay }}</p> <p>{{ model.lengthDisplay }} Obvod</p> <ul class=tasks> <li><a href=# class=\"js-zoomto zoomto\">Přibliž k měřené oblasti</a></li> <li><a href=# class=\"js-deletemarkup deletemarkup\">Zruš</a></li> </ul> '}]);\n\n//# sourceURL=webpack://ReactLeafletMeasure/./node_modules/leaflet-measure/dist/leaflet-measure.js?");
/***/ }),
/***/ "./node_modules/style-loader/lib/addStyles.js":
/*!****************************************************!*\
!*** ./node_modules/style-loader/lib/addStyles.js ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target, parent) {\n if (parent){\n return parent.querySelector(target);\n }\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target, parent) {\n // If passing function in options, then use it for resolve \"head\" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n // }\n if (typeof target === 'function') {\n return target();\n }\n if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target, parent);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = __webpack_require__(/*! ./urls */ \"./node_modules/style-loader/lib/urls.js\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (!options.singleton && typeof options.singleton !== \"boolean\") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the <head> element\n if (!options.insertInto) options.insertInto = \"head\";\n\n\t// By default, add <style> tags to the bottom of the target\n\tif (!options.insertAt) options.insertAt = \"bottom\";\n\n\tvar styles = listToStyles(list, options);\n\n\taddStylesToDom(styles, options);\n\n\treturn function update (newList) {\n\t\tvar mayRemove = [];\n\n\t\tfor (var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList, options);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\n\t\tfor (var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();\n\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n};\n\nfunction addStylesToDom (styles, options) {\n\tfor (var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles (list, options) {\n\tvar styles = [];\n\tvar newStyles = {};\n\n\tfor (var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = options.base ? item[0] + options.base : item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\n\t\tif(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse newStyles[id].parts.push(part);\n\t}\n\n\treturn styles;\n}\n\nfunction insertStyleElement (options, style) {\n\tvar target = getElement(options.insertInto)\n\n\tif (!target) {\n\t\tthrow new Error(\"Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.\");\n\t}\n\n\tvar lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];\n\n\tif (options.insertAt === \"top\") {\n\t\tif (!lastStyleElementInsertedAtTop) {\n\t\t\ttarget.insertBefore(style, target.firstChild);\n\t\t} else if (lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\ttarget.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\ttarget.appendChild(style);\n\t\t}\n\t\tstylesInsertedAtTop.push(style);\n\t} else if (options.insertAt === \"bottom\") {\n\t\ttarget.appendChild(style);\n\t} else if (typeof options.insertAt === \"object\" && options.insertAt.before) {\n\t\tvar nextSibling = getElement(options.insertAt.before, target);\n\t\ttarget.insertBefore(style, nextSibling);\n\t} else {\n\t\tthrow new Error(\"[Style Loader]\\n\\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\\n Must be 'top', 'bottom', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n\");\n\t}\n}\n\nfunction removeStyleElement (style) {\n\tif (style.parentNode === null) return false;\n\tstyle.parentNode.removeChild(style);\n\n\tvar idx = stylesInsertedAtTop.indexOf(style);\n\tif(idx >= 0) {\n\t\tstylesInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement (options) {\n\tvar style = document.createElement(\"style\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\n\tif(options.attrs.nonce === undefined) {\n\t\tvar nonce = getNonce();\n\t\tif (nonce) {\n\t\t\toptions.attrs.nonce = nonce;\n\t\t}\n\t}\n\n\taddAttrs(style, options.attrs);\n\tinsertStyleElement(options, style);\n\n\treturn style;\n}\n\nfunction createLinkElement (options) {\n\tvar link = document.createElement(\"link\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\toptions.attrs.rel = \"stylesheet\";\n\n\taddAttrs(link, options.attrs);\n\tinsertStyleElement(options, link);\n\n\treturn link;\n}\n\nfunction addAttrs (el, attrs) {\n\tObject.keys(attrs).forEach(function (key) {\n\t\tel.setAttribute(key, attrs[key]);\n\t});\n}\n\nfunction getNonce() {\n\tif (false) {}\n\n\treturn __webpack_require__.nc;\n}\n\nfunction addStyle (obj, options) {\n\tvar style, update, remove, result;\n\n\t// If a transform function was defined, run it on the css\n\tif (options.transform && obj.css) {\n\t result = typeof options.transform === 'function'\n\t\t ? options.transform(obj.css) \n\t\t : options.transform.default(obj.css);\n\n\t if (result) {\n\t \t// If transform returns a value, use that instead of the original css.\n\t \t// This allows running runtime transformations on the css.\n\t \tobj.css = result;\n\t } else {\n\t \t// If the transform function returns a falsy value, don't add this css.\n\t \t// This allows conditional loading of css\n\t \treturn function() {\n\t \t\t// noop\n\t \t};\n\t }\n\t}\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\n\t\tstyle = singleton || (singleton = createStyleElement(options));\n\n\t\tupdate = applyToSingletonTag.bind(null, style, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, style, styleIndex, true);\n\n\t} else if (\n\t\tobj.sourceMap &&\n\t\ttypeof URL === \"function\" &&\n\t\ttypeof URL.createObjectURL === \"function\" &&\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\n\t\ttypeof Blob === \"function\" &&\n\t\ttypeof btoa === \"function\"\n\t) {\n\t\tstyle = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, style, options);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\n\t\t\tif(style.href) URL.revokeObjectURL(style.href);\n\t\t};\n\t} else {\n\t\tstyle = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, style);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle (newObj) {\n\t\tif (newObj) {\n\t\t\tif (\n\t\t\t\tnewObj.css === obj.css &&\n\t\t\t\tnewObj.media === obj.media &&\n\t\t\t\tnewObj.sourceMap === obj.sourceMap\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\n\t\treturn textStore.filter(Boolean).join('\\n');\n\t};\n})();\n\nfunction applyToSingletonTag (style, index, remove, obj) {\n\tvar css = remove ? \"\" : obj.css;\n\n\tif (style.styleSheet) {\n\t\tstyle.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = style.childNodes;\n\n\t\tif (childNodes[index]) style.removeChild(childNodes[index]);\n\n\t\tif (childNodes.length) {\n\t\t\tstyle.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyle.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag (style, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyle.setAttribute(\"media\", media)\n\t}\n\n\tif(style.styleSheet) {\n\t\tstyle.styleSheet.cssText = css;\n\t} else {\n\t\twhile(style.firstChild) {\n\t\t\tstyle.removeChild(style.firstChild);\n\t\t}\n\n\t\tstyle.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink (link, options, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\t/*\n\t\tIf convertToAbsoluteUrls isn't defined, but sourcemaps are enabled\n\t\tand there is no publicPath defined then lets turn convertToAbsoluteUrls\n\t\ton by default. Otherwise default to the convertToAbsoluteUrls option\n\t\tdirectly\n\t*/\n\tvar autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;\n\n\tif (options.convertToAbsoluteUrls || autoFixUrls) {\n\t\tcss = fixUrls(css);\n\t}\n\n\tif (sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\n\t}\n\n\tvar blob = new Blob([css], { type: \"text/css\" });\n\n\tvar oldSrc = link.href;\n\n\tlink.href = URL.createObjectURL(blob);\n\n\tif(oldSrc) URL.revokeObjectURL(oldSrc);\n}\n\n\n//# sourceURL=webpack://ReactLeafletMeasure/./node_modules/style-loader/lib/addStyles.js?");
/***/ }),
/***/ "./node_modules/style-loader/lib/urls.js":
/*!***********************************************!*\
!*** ./node_modules/style-loader/lib/urls.js ***!
\***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("\n/**\n * When source maps are enabled, `style-loader` uses a link element with a data-uri to\n * embed the css on the page. This breaks all relative urls because now they are relative to a\n * bundle instead of the current page.\n *\n * One solution is to only use full urls, but that may be impossible.\n *\n * Instead, this function \"fixes\" the relative urls to be absolute according to the current page location.\n *\n * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.\n *\n */\n\nmodule.exports = function (css) {\n // get current location\n var location = typeof window !== \"undefined\" && window.location;\n\n if (!location) {\n throw new Error(\"fixUrls requires window.location\");\n }\n\n\t// blank or null?\n\tif (!css || typeof css !== \"string\") {\n\t return css;\n }\n\n var baseUrl = location.protocol + \"//\" + location.host;\n var currentDir = baseUrl + location.pathname.replace(/\\/[^\\/]*$/, \"/\");\n\n\t// convert each url(...)\n\t/*\n\tThis regular expression is just a way to recursively match brackets within\n\ta string.\n\n\t /url\\s*\\( = Match on the word \"url\" with any whitespace after it and then a parens\n\t ( = Start a capturing group\n\t (?: = Start a non-capturing group\n\t [^)(] = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t (?: = Start another non-capturing groups\n\t [^)(]+ = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t [^)(]* = Match anything that isn't a parentheses\n\t \\) = Match a end parentheses\n\t ) = End Group\n *\\) = Match anything and then a close parens\n ) = Close non-capturing group\n * = Match anything\n ) = Close capturing group\n\t \\) = Match a close parens\n\n\t /gi = Get all matches, not the first. Be case insensitive.\n\t */\n\tvar fixedCss = css.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi, function(fullMatch, origUrl) {\n\t\t// strip quotes (if they exist)\n\t\tvar unquotedOrigUrl = origUrl\n\t\t\t.trim()\n\t\t\t.replace(/^\"(.*)\"$/, function(o, $1){ return $1; })\n\t\t\t.replace(/^'(.*)'$/, function(o, $1){ return $1; });\n\n\t\t// already a full url? no change\n\t\tif (/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(unquotedOrigUrl)) {\n\t\t return fullMatch;\n\t\t}\n\n\t\t// convert the url to a full url\n\t\tvar newUrl;\n\n\t\tif (unquotedOrigUrl.indexOf(\"//\") === 0) {\n\t\t \t//TODO: should we add protocol?\n\t\t\tnewUrl = unquotedOrigUrl;\n\t\t} else if (unquotedOrigUrl.indexOf(\"/\") === 0) {\n\t\t\t// path should be relative to the base url\n\t\t\tnewUrl = baseUrl + unquotedOrigUrl; // already starts with '/'\n\t\t} else {\n\t\t\t// path should be relative to current directory\n\t\t\tnewUrl = currentDir + unquotedOrigUrl.replace(/^\\.\\//, \"\"); // Strip leading './'\n\t\t}\n\n\t\t// send back the fixed url(...)\n\t\treturn \"url(\" + JSON.stringify(newUrl) + \")\";\n\t});\n\n\t// send back the fixed css\n\treturn fixedCss;\n};\n\n\n//# sourceURL=webpack://ReactLeafletMeasure/./node_modules/style-loader/lib/urls.js?");
/***/ }),
/***/ "./src/MeasureControl.js":
/*!*******************************!*\
!*** ./src/MeasureControl.js ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\nvar _reactLeaflet = __webpack_require__(/*! react-leaflet */ \"react-leaflet\");\n\nvar _leaflet = __webpack_require__(/*! leaflet */ \"leaflet\");\n\nvar _leaflet2 = _interopRequireDefault(_leaflet);\n\n__webpack_require__(/*! leaflet-measure */ \"./node_modules/leaflet-measure/dist/leaflet-measure.js\");\n\n__webpack_require__(/*! ./leaflet-measure.css */ \"./src/leaflet-measure.css\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar MeasureControl = function (_MapControl) {\n\t_inherits(MeasureControl, _MapControl);\n\n\tfunction MeasureControl() {\n\t\t_classCallCheck(this, MeasureControl);\n\n\t\treturn _possibleConstructorReturn(this, (MeasureControl.__proto__ || Object.getPrototypeOf(MeasureControl)).apply(this, arguments));\n\t}\n\n\t_createClass(MeasureControl, [{\n\t\tkey: 'createLeafletElement',\n\t\tvalue: function createLeafletElement(props) {\n\t\t\treturn _leaflet2.default.control.measure(props);\n\t\t}\n\t}, {\n\t\tkey: 'componentDidMount',\n\t\tvalue: function componentDidMount() {\n\t\t\tvar _this2 = this;\n\n\t\t\t_get(MeasureControl.prototype.__proto__ || Object.getPrototypeOf(MeasureControl.prototype), 'componentDidMount', this).call(this);\n\n\t\t\tvar _ref = this.props.leaflet || this.context,\n\t\t\t map = _ref.map;\n\n\t\t\tvar _props = this.props,\n\t\t\t onMeasurestart = _props.onMeasurestart,\n\t\t\t onMeasurefinish = _props.onMeasurefinish;\n\n\t\t\tmap.on('measurestart', function (e) {\n\t\t\t\t_this2._propagateEvent(onMeasurestart, e);\n\t\t\t}).on('measurefinish', function (e) {\n\t\t\t\t_this2._propagateEvent(onMeasurefinish, e);\n\t\t\t});\n\t\t}\n\t}, {\n\t\tkey: 'updateLeafletElement',\n\t\tvalue: function updateLeafletElement(fromProps, toProps) {\n\t\t\tvar _ref2 = this.props.leaflet || this.context,\n\t\t\t map = _ref2.map;\n\n\t\t\tthis.leafletElement.remove();\n\t\t\tthis.leafletElement = new _leaflet2.default.control.measure(toProps);\n\t\t\tthis.leafletElement.addTo(map);\n\t\t}\n\t}, {\n\t\tkey: '_propagateEvent',\n\t\tvalue: function _propagateEvent(eventHandler, event) {\n\t\t\tif (typeof eventHandler !== 'function') return;\n\t\t\teventHandler(event);\n\t\t}\n\t}]);\n\n\treturn MeasureControl;\n}(_reactLeaflet.MapControl);\n\nexports.default = MeasureControl;\n\n//# sourceURL=webpack://ReactLeafletMeasure/./src/MeasureControl.js?");
/***/ }),
/***/ "./src/index.js":
/*!**********************!*\
!*** ./src/index.js ***!
\**********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _MeasureControl = __webpack_require__(/*! ./MeasureControl */ \"./src/MeasureControl.js\");\n\nvar _MeasureControl2 = _interopRequireDefault(_MeasureControl);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _MeasureControl2.default;\n\n//# sourceURL=webpack://ReactLeafletMeasure/./src/index.js?");
/***/ }),
/***/ "./src/leaflet-measure.css":
/*!*********************************!*\
!*** ./src/leaflet-measure.css ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("\nvar content = __webpack_require__(/*! !../node_modules/css-loader/dist/cjs.js!./leaflet-measure.css */ \"./node_modules/css-loader/dist/cjs.js!./src/leaflet-measure.css\");\n\nif(typeof content === 'string') content = [[module.i, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = __webpack_require__(/*! ../node_modules/style-loader/lib/addStyles.js */ \"./node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(false) {}\n\n//# sourceURL=webpack://ReactLeafletMeasure/./src/leaflet-measure.css?");
/***/ }),
/***/ "leaflet":
/*!************************************************************************!*\
!*** external {"commonjs":"leaflet","commonjs2":"leaflet","root":"L"} ***!
\************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_leaflet__;\n\n//# sourceURL=webpack://ReactLeafletMeasure/external_%7B%22commonjs%22:%22leaflet%22,%22commonjs2%22:%22leaflet%22,%22root%22:%22L%22%7D?");
/***/ }),
/***/ "react-leaflet":
/*!***********************************************************************************************!*\
!*** external {"commonjs":"react-leaflet","commonjs2":"react-leaflet","root":"ReactLeaflet"} ***!
\***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = __WEBPACK_EXTERNAL_MODULE_react_leaflet__;\n\n//# sourceURL=webpack://ReactLeafletMeasure/external_%7B%22commonjs%22:%22react-leaflet%22,%22commonjs2%22:%22react-leaflet%22,%22root%22:%22ReactLeaflet%22%7D?");
/***/ })
/******/ })["default"];
}); | 399.450704 | 38,483 | 0.683462 |
83cefc6541cea43a038c20d3154c28195f483714 | 2,630 | js | JavaScript | ee/spec/frontend/packages/details/components/conan_installation_spec.js | dreaminplus/gitlab | 8cea25cf215167552a9ff2433f0e3a7df13d3021 | [
"MIT"
] | null | null | null | ee/spec/frontend/packages/details/components/conan_installation_spec.js | dreaminplus/gitlab | 8cea25cf215167552a9ff2433f0e3a7df13d3021 | [
"MIT"
] | 6 | 2021-05-20T21:17:26.000Z | 2022-03-02T09:51:46.000Z | ee/spec/frontend/packages/details/components/conan_installation_spec.js | dreaminzero-cell/gitlab | 8cea25cf215167552a9ff2433f0e3a7df13d3021 | [
"MIT"
] | 3 | 2020-11-04T05:26:21.000Z | 2020-11-06T04:49:03.000Z | import Vuex from 'vuex';
import { mount, createLocalVue } from '@vue/test-utils';
import ConanInstallation from 'ee/packages/details/components/conan_installation.vue';
import { conanPackage as packageEntity } from '../../mock_data';
import { registryUrl as conanPath } from '../mock_data';
import { TrackingActions, TrackingLabels } from 'ee/packages/details/constants';
import Tracking from '~/tracking';
const localVue = createLocalVue();
localVue.use(Vuex);
describe('ConanInstallation', () => {
let wrapper;
const conanInstallationCommandStr = 'foo/command';
const conanSetupCommandStr = 'foo/setup';
const store = new Vuex.Store({
state: {
packageEntity,
conanPath,
},
getters: {
conanInstallationCommand: () => conanInstallationCommandStr,
conanSetupCommand: () => conanSetupCommandStr,
},
});
const installationTab = () => wrapper.find('.js-installation-tab > a');
const setupTab = () => wrapper.find('.js-setup-tab > a');
const conanInstallationCommand = () => wrapper.find('.js-conan-command > input');
const conanSetupCommand = () => wrapper.find('.js-conan-setup > input');
function createComponent() {
wrapper = mount(ConanInstallation, {
localVue,
store,
});
}
beforeEach(() => {
createComponent();
});
afterEach(() => {
if (wrapper) wrapper.destroy();
});
describe('installation commands', () => {
it('renders the correct command', () => {
expect(conanInstallationCommand().element.value).toBe(conanInstallationCommandStr);
});
});
describe('setup commands', () => {
it('renders the correct command', () => {
expect(conanSetupCommand().element.value).toBe(conanSetupCommandStr);
});
});
describe('tab change tracking', () => {
let eventSpy;
const label = TrackingLabels.CONAN_INSTALLATION;
beforeEach(() => {
eventSpy = jest.spyOn(Tracking, 'event');
});
it('should track when the setup tab is clicked', () => {
setupTab().trigger('click');
return wrapper.vm.$nextTick().then(() => {
expect(eventSpy).toHaveBeenCalledWith(undefined, TrackingActions.REGISTRY_SETUP, {
label,
});
});
});
it('should track when the installation tab is clicked', () => {
setupTab().trigger('click');
return wrapper.vm
.$nextTick()
.then(() => {
installationTab().trigger('click');
})
.then(() => {
expect(eventSpy).toHaveBeenCalledWith(undefined, TrackingActions.INSTALLATION, {
label,
});
});
});
});
});
| 27.684211 | 90 | 0.620532 |
83cf5a94e3d514801310ef123f68c4cfc2f70108 | 1,247 | js | JavaScript | test/integration/export/next.config.js | Stevenlee731/next.js | 69150043e434fb4b5a7fd565dc3c13aa6f75c3e8 | [
"MIT"
] | 4 | 2019-09-10T05:16:51.000Z | 2019-09-10T09:17:51.000Z | test/integration/export/next.config.js | sudipt1999/next.js | 5a1b32dcf1ad1b3a79096df2a217677323fe05b8 | [
"MIT"
] | 1 | 2020-07-22T08:25:11.000Z | 2020-07-22T08:25:11.000Z | test/integration/export/next.config.js | sudipt1999/next.js | 5a1b32dcf1ad1b3a79096df2a217677323fe05b8 | [
"MIT"
] | null | null | null | const { PHASE_DEVELOPMENT_SERVER } = require('next-server/constants')
module.exports = phase => {
return {
distDir: phase === PHASE_DEVELOPMENT_SERVER ? '.next-dev' : '.next',
publicRuntimeConfig: {
foo: 'foo'
},
serverRuntimeConfig: {
bar: 'bar'
},
experimental: {
// exportTrailingSlash: false,
},
exportPathMap: function () {
return {
'/': { page: '/' },
'/about': { page: '/about' },
'/button-link': { page: '/button-link' },
'/get-initial-props-with-no-query': {
page: '/get-initial-props-with-no-query'
},
'/counter': { page: '/counter' },
'/dynamic-imports': { page: '/dynamic-imports' },
'/dynamic': { page: '/dynamic', query: { text: 'cool dynamic text' } },
'/dynamic/one': {
page: '/dynamic',
query: { text: 'next export is nice' }
},
'/dynamic/two': {
page: '/dynamic',
query: { text: 'zeit is awesome' }
},
'/file-name.md': {
page: '/dynamic',
query: { text: 'this file has an extension' }
},
'/query': { page: '/query', query: { a: 'blue' } }
}
} // end exportPathMap
}
}
| 29 | 79 | 0.489174 |
83cffdbe0808301bc22c8d9c2e4d94ba7dbf2769 | 1,635 | js | JavaScript | deps/node-10.15.3/deps/v8/test/js-perf-test/ArraySort/sort-cmpfn-kindchange.js | gatarelib/LiquidCore | 9405979363f2353ac9a71ad8ab59685dd7f919c9 | [
"MIT"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | test/js-perf-test/ArraySort/sort-cmpfn-kindchange.js | nacersalaheddine/v8 | cffe6247ad06d90d2fb69e3710358983eaed39d5 | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | test/js-perf-test/ArraySort/sort-cmpfn-kindchange.js | nacersalaheddine/v8 | cffe6247ad06d90d2fb69e3710358983eaed39d5 | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | // Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
load('sort-base.js');
// Creates a comparison function, that will call the provided transform function
// after a set amount of comparisons. The transform function should cause the
// element kind of the array to change.
function CreateCompareFn(transformfn) {
let counter = 0;
return (a, b) => {
++counter;
if (counter == kArraySize/2) {
transformfn();
}
return cmp_smaller(a, b);
}
}
let cmp_packed_smi_to_double = CreateCompareFn(() => array_to_sort.push(0.1));
let cmp_holey_smi_to_double = CreateCompareFn(() => array_to_sort.push(0.1));
let cmp_double_to_double = CreateCompareFn(() => array_to_sort.length *= 2);
benchy('PackedSmiToPackedDouble', CreateSortFn([cmp_packed_smi_to_double]),
CreatePackedSmiArray, AssertPackedDoubleElements);
benchy('HoleySmiToHoleyDouble', CreateSortFn([cmp_holey_smi_to_double]),
CreateHoleySmiArray, AssertHoleyDoubleElements);
benchy('PackedDoubleToHoleyDouble', CreateSortFn([cmp_double_to_double]),
CreatePackedDoubleArray, AssertHoleyDoubleElements);
let cmp_packed_to_dict = CreateCompareFn(() => array_to_sort[%MaxSmi()] = 42);
let cmp_holey_to_dict = CreateCompareFn(() => array_to_sort[%MaxSmi()] = 42);
benchy('PackedElementToDictionary', CreateSortFn([cmp_packed_to_dict]),
CreatePackedObjectArray, AssertDictionaryElements);
benchy('HoleyElementToDictionary', CreateSortFn([cmp_holey_to_dict]),
CreateHoleyObjectArray, AssertDictionaryElements);
| 40.875 | 80 | 0.75841 |
83d2a205295cfa8fe861a65416b3d0bf574e9dca | 1,761 | js | JavaScript | node_modules/rc-pagination/lib/Pager.js | hopefullman/Component | 493b0ba4b7e4df84173a46085d8e86e87f0d440d | [
"MIT"
] | 1 | 2021-04-01T18:54:13.000Z | 2021-04-01T18:54:13.000Z | node_modules/rc-pagination/lib/Pager.js | hopefullman/Component | 493b0ba4b7e4df84173a46085d8e86e87f0d440d | [
"MIT"
] | 12 | 2020-09-06T21:20:04.000Z | 2022-03-08T22:58:34.000Z | node_modules/rc-pagination/lib/Pager.js | hopefullman/Component | 493b0ba4b7e4df84173a46085d8e86e87f0d440d | [
"MIT"
] | 1 | 2021-04-01T18:54:28.000Z | 2021-04-01T18:54:28.000Z | 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var Pager = function Pager(props) {
var prefixCls = props.rootPrefixCls + '-item';
var cls = prefixCls + ' ' + prefixCls + '-' + props.page;
if (props.active) {
cls = cls + ' ' + prefixCls + '-active';
}
if (props.className) {
cls = cls + ' ' + props.className;
}
if (!props.page) {
cls = cls + ' ' + prefixCls + '-disabled';
}
var handleClick = function handleClick() {
props.onClick(props.page);
};
var handleKeyPress = function handleKeyPress(e) {
props.onKeyPress(e, props.onClick, props.page);
};
return _react2['default'].createElement(
'li',
{
title: props.showTitle ? props.page : null,
className: cls,
onClick: handleClick,
onKeyPress: handleKeyPress,
tabIndex: '0'
},
props.itemRender(props.page, 'page', _react2['default'].createElement(
'a',
null,
props.page
))
);
};
Pager.propTypes = {
page: _propTypes2['default'].number,
active: _propTypes2['default'].bool,
last: _propTypes2['default'].bool,
locale: _propTypes2['default'].object,
className: _propTypes2['default'].string,
showTitle: _propTypes2['default'].bool,
rootPrefixCls: _propTypes2['default'].string,
onClick: _propTypes2['default'].func,
onKeyPress: _propTypes2['default'].func,
itemRender: _propTypes2['default'].func
};
exports['default'] = Pager;
module.exports = exports['default']; | 24.458333 | 97 | 0.653038 |
83d2d9552d8847f2db3d877e0a5bcc080bc34c93 | 421 | js | JavaScript | functions/src/entrypoints/dialogflow/responses/debug.js | isabella232/google-assistant-greeting-cards | 56ced87462aad003fdda1e3df79a3c3ef4407807 | [
"MIT"
] | 11 | 2018-03-12T17:11:04.000Z | 2021-07-20T00:03:18.000Z | functions/src/entrypoints/dialogflow/responses/debug.js | Jam3/google-assistant-greeting-cards | 56ced87462aad003fdda1e3df79a3c3ef4407807 | [
"MIT"
] | 1 | 2021-02-23T23:44:13.000Z | 2021-02-23T23:44:13.000Z | functions/src/entrypoints/dialogflow/responses/debug.js | isabella232/google-assistant-greeting-cards | 56ced87462aad003fdda1e3df79a3c3ef4407807 | [
"MIT"
] | 4 | 2018-04-23T12:15:33.000Z | 2020-12-26T10:41:02.000Z | 'use strict';
const utils = require('../../../utils/utils');
const { strings } = require('../constants');
const normalResponse = (app, copy) => {
const response = app.buildRichResponse();
const firstResponse = utils.randomString(copy);
response.addSimpleResponse(firstResponse);
app.ask(response);
};
module.exports.initial = app => {
const { initial: copy } = strings.debug;
normalResponse(app, copy);
};
| 24.764706 | 49 | 0.679335 |
83d2f361fdaa171a2846c911d4da6583b873c7ec | 585 | js | JavaScript | src/pages/error/index.js | dimichgh/oja-selling-example | dad94a6e1087f8437a3faa20f9fc872b2eb879fd | [
"MIT"
] | 8 | 2018-01-09T12:14:21.000Z | 2020-02-24T12:17:19.000Z | src/pages/error/index.js | dimichgh/oja-selling-example | dad94a6e1087f8437a3faa20f9fc872b2eb879fd | [
"MIT"
] | 1 | 2017-10-09T07:36:11.000Z | 2017-10-09T07:36:11.000Z | src/pages/error/index.js | dimichgh/oja-selling-example | dad94a6e1087f8437a3faa20f9fc872b2eb879fd | [
"MIT"
] | 3 | 2018-07-05T17:38:17.000Z | 2019-06-17T02:35:02.000Z | 'use strict';
const Action = require('oja').Action;
const RenderAction = require('../../common/render-action.js');
const template = require('./index.marko');
// compose the whole flow
module.exports = class PageAction extends Action {
constructor() {
super();
// register these actions
this.define('model', {
error: 'Failed to handle your command'
});
}
execute() {
// we separated render and template action to
// have more control during unit testing
this.add(new RenderAction(template));
}
};
| 23.4 | 62 | 0.608547 |
83d3f48c246de058a5c27bb37544ebfd16d23d17 | 533 | js | JavaScript | client/scripts/routes/home/HomeContainer.js | amitava82/product-manager | b736650d1f5ea87bac6a542ef23f624e592fd854 | [
"MIT"
] | null | null | null | client/scripts/routes/home/HomeContainer.js | amitava82/product-manager | b736650d1f5ea87bac6a542ef23f624e592fd854 | [
"MIT"
] | null | null | null | client/scripts/routes/home/HomeContainer.js | amitava82/product-manager | b736650d1f5ea87bac6a542ef23f624e592fd854 | [
"MIT"
] | null | null | null | /**
* Created by amitava on 29/05/16.
*/
import React from 'react';
import {connect} from 'react-redux';
import autobind from 'autobind-decorator';
import {Link} from 'react-router';
import Helmet from 'react-helmet';
import Header from '../../components/Header';
@connect(state => state)
export default class HomeContainer extends React.Component {
render(){
return (
<div className="home-container">
<Helmet title="Home" />
<Header />
</div>
)
}
} | 24.227273 | 60 | 0.600375 |
83d4a9c733fead3481dad7b2d18700fea1e52f87 | 23,247 | js | JavaScript | Gruntfile.js | darkmadesu/phaser-gameproject | 239b4c49f3743342327d16e399faba30f6e6df2c | [
"MIT"
] | 1 | 2017-04-18T02:41:53.000Z | 2017-04-18T02:41:53.000Z | Gruntfile.js | darkmadesu/phaser-gameproject | 239b4c49f3743342327d16e399faba30f6e6df2c | [
"MIT"
] | null | null | null | Gruntfile.js | darkmadesu/phaser-gameproject | 239b4c49f3743342327d16e399faba30f6e6df2c | [
"MIT"
] | 1 | 2019-02-08T17:49:20.000Z | 2019-02-08T17:49:20.000Z | /// <binding BeforeBuild='default' />
module.exports = function (grunt) {
var loadConfig = require('load-grunt-config');
loadConfig(grunt, {
configPath: __dirname + '/tasks/options',
config: {
target_dir: 'build',
release_dir: 'build',
release_custom_dir: 'build/custom',
compile_dir: 'dist',
modules_dir: 'dist/modules',
docs_dir: 'docs',
sourcemap: false,
filename: 'phaser',
pixiFilename: 'pixi.js',
p2Filename: 'p2.js',
creatureFilename: 'creature.js',
filelist: [],
banner: require('fs').readFileSync(__dirname + '/tasks/banner.txt', 'utf8')
}
});
grunt.loadTasks('tasks');
grunt.registerTask('default', ['build']);
grunt.registerTask('docs', ['clean:docs', 'pixidoc', 'gitclone:plugins', 'jsdoc:html', 'replace:docs', 'clean:out']);
grunt.registerTask('tsdocs', ['clean:out', 'pixidoc', 'gitclone:plugins', 'jsdoc:json', 'buildtsdoc:pixi', 'buildtsdoc:phaser', 'replace:phasertsdefheader']);
grunt.registerTask('custom', 'Build a custom version of Phaser', function(arg) {
var modules = {
'intro': { 'description': 'Phaser UMD wrapper', 'optional': true, 'stub': false },
'phaser': { 'description': 'Phaser Globals', 'optional': false, 'stub': false },
'geom': { 'description': 'Geometry Classes', 'optional': false, 'stub': false },
'core': { 'description': 'Phaser Core', 'optional': false, 'stub': false },
'input': { 'description': 'Input Manager + Mouse and Touch Support', 'optional': false, 'stub': false },
'gamepad': { 'description': 'Gamepad Input', 'optional': true, 'stub': false },
'keyboard': { 'description': 'Keyboard Input', 'optional': true, 'stub': false },
'components': { 'description': 'Game Object Components', 'optional': false, 'stub': false },
'gameobjects': { 'description': 'Core Game Objects', 'optional': false, 'stub': false },
'bitmapdata': { 'description': 'BitmapData Game Object', 'optional': true, 'stub': false },
'graphics': { 'description': 'Graphics and PIXI Mask Support', 'optional': true, 'stub': false },
'rendertexture': { 'description': 'RenderTexture Game Object', 'optional': true, 'stub': false },
'text': { 'description': 'Text Game Object (inc. Web Font Support)', 'optional': true, 'stub': false },
'bitmaptext': { 'description': 'BitmapText Game Object', 'optional': true, 'stub': false },
'retrofont': { 'description': 'Retro Fonts Game Object', 'optional': true, 'stub': false },
'rope': { 'description': 'Rope and Strip Game Object', 'optional': true, 'stub': false },
'tilesprite': { 'description': 'Tile Sprite Game Object', 'optional': true, 'stub': true },
'system': { 'description': 'System Classes', 'optional': false, 'stub': false },
'math': { 'description': 'Math, QuadTree and RND', 'optional': false, 'stub': false },
'net': { 'description': 'Network Class', 'optional': true, 'stub': true },
'tweens': { 'description': 'Tween Manager', 'optional': true, 'stub': true },
'time': { 'description': 'Time and Clock Manager', 'optional': false, 'stub': false },
'animation': { 'description': 'Animation and Frame Manager', 'optional': false, 'stub': false },
'loader': { 'description': 'Loader and Cache', 'optional': false, 'stub': false },
'sound': { 'description': 'Sound Support (Web Audio and HTML Audio)', 'optional': true, 'stub': true },
'scale': { 'description': 'Scale and Full Screen Manager', 'optional': true, 'stub': true },
'debug': { 'description': 'Debug Class', 'optional': true, 'stub': true },
'dom': { 'description': 'DOM Utilities', 'optional': true, 'stub': true },
'utils': { 'description': 'Core Utilities', 'optional': false, 'stub': false },
'create': { 'description': 'Create Support', 'optional': true, 'stub': true },
'flexgrid': { 'description': 'Flex Grid and Flex Layer', 'optional': true, 'stub': false },
'color': { 'description': 'Color Functions', 'optional': true, 'stub': true },
'physics': { 'description': 'Physics Manager', 'optional': false, 'stub': false },
'arcade': { 'description': 'Arcade Physics', 'optional': true, 'stub': false },
'ninja': { 'description': 'Ninja Physics', 'optional': true, 'stub': false },
'p2': { 'description': 'P2 Physics', 'optional': true, 'stub': false },
'tilemaps': { 'description': 'Tilemap Support', 'optional': true, 'stub': false },
'particles': { 'description': 'Arcade Physics Particle System', 'optional': true, 'stub': true },
'weapon': { 'description': 'Arcade Physics Weapon Plugin', 'optional': true, 'stub': false },
'creature': { 'description': 'Creature Animation Tool Support', 'optional': true, 'stub': false },
'video': { 'description': 'Video Game Object', 'optional': true, 'stub': false },
'pixidefs': { 'description': 'Pixi defaults', 'optional': true, 'stub': false },
'outro': { 'description': 'Phaser UMD closure', 'optional': true, 'stub': false }
};
grunt.log.writeln("---------------------");
grunt.log.writeln("Building Phaser " + grunt.config.get('package.version'));
grunt.log.writeln("---------------------");
if (!grunt.option('exclude'))
{
grunt.log.writeln("\nUse --exclude to select which modules to exclude:\n");
for (var module in modules)
{
if (modules[module].optional)
{
grunt.log.writeln(module + ' - ' + modules[module].description);
}
}
grunt.log.writeln("\nFor example: --exclude p2,tilemaps,retrofont\n");
grunt.log.writeln("Optional flags:\n");
grunt.log.writeln("--filename yourfilename (builds to your own custom file name)");
grunt.log.writeln("--sourcemap true (creates a source map)");
grunt.log.writeln("--split true (splits Phaser, PIXI, p2 and Creature into separate files)");
grunt.log.writeln("--uglify true (runs Uglify on the output files)");
grunt.log.writeln("\nNote that some modules have dependencies on others.\n");
grunt.fail.fatal("No build options were specified.");
}
else
{
// Defaults
grunt.config.set('sourcemap', false);
grunt.config.set('filename', 'phaser');
grunt.config.set('split', false);
grunt.config.set('target_dir', '<%= release_dir %>');
var split = false;
// Overrides
if (grunt.option('filename'))
{
grunt.config.set('filename', grunt.option('filename'));
}
if (grunt.option('sourcemap'))
{
grunt.config.set('sourcemap', grunt.option('sourcemap'));
}
if (grunt.option('split'))
{
grunt.config.set('split', grunt.option('split'));
split = grunt.option('split');
}
grunt.log.writeln("Excluding modules:\n");
var excludedKeys = [];
// Nothing is excluded!
var excludes = false;
if (grunt.option('exclude') !== 'null')
{
excludes = grunt.option('exclude').split(',');
// Check the given modules are all valid
for (var i = 0; i < excludes.length; i++)
{
var exclude = excludes[i];
if (modules[exclude])
{
grunt.log.writeln("* " + exclude + ' - ' + modules[exclude].description);
excludedKeys[exclude] = true;
}
else
{
grunt.fail.fatal("Unknown module '" + exclude + "'");
}
}
// Handle basic dependencies
if (excludedKeys['arcade'] && !excludedKeys['particles'])
{
grunt.log.writeln("Warning: Particles rely on Arcade Physics which has been excluded. Removing Particles from build.");
excludes.push('particles');
}
if (excludedKeys['arcade'] && !excludedKeys['weapon'])
{
grunt.log.writeln("Warning: The Weapon Plugin relies on Arcade Physics which has been excluded. Removing Weapon Plugin from build.");
excludes.push('weapon');
}
if (excludedKeys['rendertexture'] && !excludedKeys['retrofont'])
{
grunt.log.writeln("Warning: RetroFonts rely on RenderTextures. Excluding from build.");
excludes.push('retrofont');
}
}
/////////////////////////////////////////////////////////////////////////
// Ok we know the excludes array is fine, let's get this show started //
/////////////////////////////////////////////////////////////////////////
var filelist = [];
var pixiFilelist = [];
// Clean the working folder
var tasks = [ 'clean:build' ];
if (split)
{
////////////////////////////////////////
// Split build (for Browserify, etc) //
////////////////////////////////////////
grunt.log.writeln("\nSplitting Globals ...\n");
// 1) Creature
if (!excludedKeys['creature'])
{
grunt.log.writeln("-> Creature");
tasks.push('concat:creatureGlobalSplit');
if (grunt.option('uglify'))
{
tasks.push('uglify:creature');
}
}
// 2) P2
if (!excludedKeys['p2'])
{
grunt.log.writeln("-> P2.js");
tasks.push('concat:p2GlobalSplit');
if (grunt.option('uglify'))
{
tasks.push('uglify:p2');
}
}
// 3) PIXI
grunt.log.writeln("-> PIXI");
if (!excludedKeys['intro'])
{
tasks.push('concat:pixiIntro');
pixiFilelist.push('<%= modules_dir %>/pixi-intro.js');
}
tasks.push('concat:pixiMain');
pixiFilelist.push('<%= modules_dir %>/pixi-main.js');
/*
// Optional Rope
if (!excludedKeys['rope'])
{
grunt.log.writeln("-> PIXI.Rope");
tasks.push('concat:pixiRope');
pixiFilelist.push('<%= modules_dir %>/pixi-rope.js');
}
// Optional Tilesprite
if (!excludedKeys['tilesprite'])
{
grunt.log.writeln("-> PIXI.TileSprite");
tasks.push('concat:pixiTileSprite');
pixiFilelist.push('<%= modules_dir %>/pixi-tilesprite.js');
}
*/
// PIXI Outro
if (!excludedKeys['outro'])
{
tasks.push('concat:pixiOutro');
pixiFilelist.push('<%= modules_dir %>/pixi-outro.js');
}
grunt.config.set('pixiFilelist', pixiFilelist);
tasks.push('concat:pixi');
if (grunt.option('uglify'))
{
tasks.push('uglify:pixi');
}
}
else
{
///////////////////
// Single build //
///////////////////
grunt.log.writeln("\nPackaging Globals ...\n");
// Prepare the globals first, the libs that live outside of Phaser
// 1) Creature
if (!excludedKeys['creature'])
{
grunt.log.writeln("-> Creature");
tasks.push('concat:creatureGlobal');
filelist.push('<%= modules_dir %>/creature-global.js');
}
// 2) P2
if (!excludedKeys['p2'])
{
grunt.log.writeln("-> P2.js");
tasks.push('concat:p2Global');
filelist.push('<%= modules_dir %>/p2-global.js');
}
// 3) PIXI
grunt.log.writeln("-> PIXI");
if (!excludedKeys['intro'])
{
tasks.push('concat:pixiIntro');
filelist.push('<%= modules_dir %>/pixi-intro.js');
}
tasks.push('concat:pixiMain');
filelist.push('<%= modules_dir %>/pixi-main.js');
/*
// Optional Rope
if (!excludedKeys['rope'])
{
grunt.log.writeln("-> PIXI.Rope");
tasks.push('concat:pixiRope');
filelist.push('<%= modules_dir %>/pixi-rope.js');
}
// Optional Tilesprite
if (!excludedKeys['tilesprite'])
{
grunt.log.writeln("-> PIXI.TileSprite");
tasks.push('concat:pixiTileSprite');
filelist.push('<%= modules_dir %>/pixi-tilesprite.js');
}
*/
// PIXI Outro
if (!excludedKeys['outro'])
{
tasks.push('concat:pixiOutro');
filelist.push('<%= modules_dir %>/pixi-outro.js');
}
}
// And now for Phaser
grunt.log.writeln("\nBuilding ...");
if (excludes !== false)
{
for (var key in modules)
{
if (modules[key].stub && excludes.indexOf(key) !== -1)
{
// If the module IS excluded and has a stub, we need that
tasks.push('concat:' + key + 'Stub');
filelist.push('<%= modules_dir %>/' + key + '.js');
}
else if (modules[key].optional === false || excludes.indexOf(key) === -1)
{
// If it's required or NOT excluded, add it to the tasks list
tasks.push('concat:' + key);
filelist.push('<%= modules_dir %>/' + key + '.js');
// Special case: If they have Arcade Physics AND Tilemaps we need to include the Tilemap Collision class
if (key === 'arcade' && !excludes['tilemaps'])
{
tasks.push('concat:arcadeTilemaps');
filelist.push('<%= modules_dir %>/arcadeTilemaps.js');
}
}
}
}
else
{
// The full monty ...
for (var mkey in modules)
{
tasks.push('concat:' + mkey);
filelist.push('<%= modules_dir %>/' + mkey + '.js');
}
}
grunt.config.set('filelist', filelist);
tasks.push('concat:custom');
if (grunt.option('uglify'))
{
tasks.push('uglify:custom');
}
if (grunt.option('copy'))
{
tasks.push('copy:custom');
}
else if (grunt.option('copycustom'))
{
grunt.config.set('target_dir', '<%= release_custom_dir %>');
tasks.push('copy:custom');
}
grunt.task.run(tasks);
}
});
grunt.registerTask('dist', 'Compile all Phaser versions and copy to the build folder', function() {
grunt.task.run('clean:release');
grunt.task.run('full');
grunt.task.run('arcadephysics');
grunt.task.run('nophysics');
grunt.task.run('minimum');
grunt.task.run('split');
});
grunt.registerTask('release', 'Compile all Phaser versions to the build folder and update docs and defs', function() {
grunt.task.run('clean:release');
grunt.task.run('full');
grunt.task.run('arcadephysics');
grunt.task.run('nophysics');
grunt.task.run('minimum');
grunt.task.run('split');
grunt.task.run('creature');
grunt.task.run('docs');
grunt.task.run('tsdocs');
});
grunt.registerTask('build', 'Compile all Phaser versions just to the temporary dist folder', function() {
grunt.option('exclude', 'ninja,creature');
grunt.option('filename', 'phaser');
grunt.option('sourcemap', true);
grunt.option('copy', false);
grunt.option('uglify', true);
grunt.task.run('custom');
});
grunt.registerTask('full', 'Phaser (excluding Ninja and Creature)', function() {
grunt.option('exclude', 'ninja,creature');
grunt.option('filename', 'phaser');
grunt.option('sourcemap', true);
grunt.option('copy', true);
grunt.option('uglify', true);
grunt.task.run('custom');
});
grunt.registerTask('complete', 'Phaser Build with all libs', function() {
grunt.option('exclude', 'null');
grunt.option('filename', 'phaser-complete');
grunt.option('sourcemap', false);
grunt.option('copy', true);
grunt.option('copycustom', true);
grunt.option('uglify', true);
grunt.task.run('custom');
});
grunt.registerTask('split', 'Compile Phaser to dist folder and splits the globals into single files', function() {
grunt.option('exclude', 'ninja,creature');
grunt.option('filename', 'phaser-split');
grunt.option('sourcemap', true);
grunt.option('copy', false);
grunt.option('copycustom', true);
grunt.option('uglify', true);
grunt.option('split', true);
grunt.task.run('custom');
});
grunt.registerTask('test', 'Phaser Test Build (all libs)', function() {
grunt.option('exclude', 'ninja,creature');
grunt.option('filename', 'phaser-test');
grunt.option('sourcemap', false);
grunt.option('copy', false);
grunt.option('uglify', false);
grunt.task.run('custom');
});
grunt.registerTask('uglytest', 'Phaser Test Build (all libs)', function() {
grunt.option('exclude', 'ninja,creature');
grunt.option('filename', 'phaser-test');
grunt.option('sourcemap', false);
grunt.option('copy', false);
grunt.option('uglify', true);
grunt.task.run('custom');
});
grunt.registerTask('creature', 'Phaser + Creature', function() {
grunt.option('exclude', 'ninja');
grunt.option('filename', 'phaser-creature');
grunt.option('sourcemap', true);
grunt.option('copy', true);
grunt.option('copycustom', true);
grunt.option('uglify', true);
grunt.task.run('custom');
});
grunt.registerTask('arcadephysics', 'Phaser with Arcade Physics, Tilemaps, Weapons and Particles', function() {
grunt.option('exclude', 'ninja,p2,creature');
grunt.option('filename', 'phaser-arcade-physics');
grunt.option('sourcemap', true);
grunt.option('copy', false);
grunt.option('copycustom', true);
grunt.option('uglify', true);
grunt.task.run('custom');
});
grunt.registerTask('ninjaphysics', 'Phaser with Ninja Physics and Tilemaps', function() {
grunt.option('exclude', 'p2,particles,creature');
grunt.option('filename', 'phaser-ninja-physics');
grunt.option('sourcemap', true);
grunt.option('copy', false);
grunt.option('copycustom', true);
grunt.option('uglify', true);
grunt.task.run('custom');
});
grunt.registerTask('nophysics', 'Phaser without physics, tilemaps or particles', function() {
grunt.option('exclude', 'arcade,ninja,p2,tilemaps,particles,creature,weapon');
grunt.option('filename', 'phaser-no-physics');
grunt.option('sourcemap', true);
grunt.option('copy', false);
grunt.option('copycustom', true);
grunt.option('uglify', true);
grunt.task.run('custom');
});
grunt.registerTask('minimum', 'Phaser without any optional modules', function() {
grunt.option('exclude', 'gamepad,keyboard,bitmapdata,graphics,rendertexture,text,bitmaptext,retrofont,net,tweens,sound,debug,arcade,ninja,p2,tilemaps,particles,creature,video,rope,tilesprite,weapon');
grunt.option('filename', 'phaser-minimum');
grunt.option('sourcemap', true);
grunt.option('copy', false);
grunt.option('copycustom', true);
grunt.option('uglify', true);
grunt.task.run('custom');
});
};
| 40.570681 | 208 | 0.463501 |
83d542c3ae659dde1ab63cf24642a0047b53a77d | 884 | js | JavaScript | src/components/UI/Sheet/SheetHelpers/SheetBackdrop.js | hrbengtsen/pomodoify | 405d50b64c8b08ecd879b7620a145d536d056582 | [
"MIT"
] | null | null | null | src/components/UI/Sheet/SheetHelpers/SheetBackdrop.js | hrbengtsen/pomodoify | 405d50b64c8b08ecd879b7620a145d536d056582 | [
"MIT"
] | null | null | null | src/components/UI/Sheet/SheetHelpers/SheetBackdrop.js | hrbengtsen/pomodoify | 405d50b64c8b08ecd879b7620a145d536d056582 | [
"MIT"
] | null | null | null | import styled, { css, keyframes } from 'styled-components';
const FadeIn = keyframes`
from {
opacity: 0;
}
to {
opacity: 0.6;
}
`;
const FadeOut = keyframes`
from {
opacity: 0.6;
}
to {
opacity: 0;
}
`;
const toggle = (props) => {
if (props.hidden) {
return css`
animation-name: ${FadeOut};
animation-duration: 0.4s;
animation-timing-function: ease;
visibility: hidden;
`;
}
return css`
animation-name: ${FadeIn};
animation-duration: 0.4s;
animation-timing-function: ease;
visibility: visible;
`;
};
const SheetBackdrop = styled.div`
display: block;
position: fixed;
top: 0;
left: 0;
z-index: 1040;
width: 100vw;
height: 100vh;
background-color: #887D6A;
opacity: 0.6;
transition: visibility 0.4s ease;
${props => toggle(props)}
`;
export { SheetBackdrop };
| 15.785714 | 59 | 0.597285 |
83d553343af6b607fa9c8f20058708d1ce3a0d1e | 2,194 | js | JavaScript | control-raycaster.js | sifbuilder/d3animas | b08a9525b9efac23d1a7689844b99b257e308fb9 | [
"MIT"
] | null | null | null | control-raycaster.js | sifbuilder/d3animas | b08a9525b9efac23d1a7689844b99b257e308fb9 | [
"MIT"
] | null | null | null | control-raycaster.js | sifbuilder/d3animas | b08a9525b9efac23d1a7689844b99b257e308fb9 | [
"MIT"
] | null | null | null | /*******************************************
* @controlRaycaster
*
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports)
: typeof define === 'function' && define.amd ? define(['exports'], factory)
: (factory((global.controlRaycaster = global.controlRaycaster || {})))
}(this, function (exports) {
'use strict'
let controlRaycaster = function controlRaycaster (__mapper = {}) {
let f = __mapper('props')()
let raycaster = new THREE.Raycaster()
let state = {}
state.mouse = new THREE.Vector2()
state.mouse.x = -2 // Initialize off canvas
state.mouse.y = -2
state.domNode = null
/*******************************************
* @enty
*
*/
let enty = function enty () {}
enty.domNode = function domNode (domNode) {
if (domNode === undefined) return state.domNode
state.domNode = domNode
return enty
}
/*******************************************
* @listerner
*
*/
let listerner = function listerner (event) {
let domElem = enty.domNode()
let width = domElem.getBoundingClientRect().width
let height = domElem.getBoundingClientRect().height
const offset = getOffset(domElem),
relPos = {
x: event.pageX - offset.left,
y: event.pageY - offset.top
}
state.mouse.x = (relPos.x / width) * 2 - 1
state.mouse.y = -(relPos.y / height) * 2 + 1
function getOffset (el) {
const rect = el.getBoundingClientRect(),
scrollLeft = window.pageXOffset || document.documentElement.scrollLeft,
scrollTop = window.pageYOffset || document.documentElement.scrollTop
return { top: rect.top + scrollTop, left: rect.left + scrollLeft }
}
}
/*******************************************
* @control
*
*/
enty.control = function control (domNode) {
enty.domNode(domNode)
domNode.addEventListener('mousemove', listerner) // event listener
}
enty.mouse = function () {
return state.mouse
}
return enty
}
exports.controlRaycaster = controlRaycaster
}))
| 28.128205 | 81 | 0.552416 |
83d63d8bafff5e4fd000c3cb1c6000f1c4f129c9 | 319,904 | js | JavaScript | src/pages/adaptations.js | yury-n/adaptiff | 6b0e6c0049e9c8b63f9f5d967a80811552e57661 | [
"MIT"
] | 2 | 2019-05-29T20:03:28.000Z | 2020-07-22T22:44:15.000Z | src/pages/adaptations.js | yury-n/adaptiff | 6b0e6c0049e9c8b63f9f5d967a80811552e57661 | [
"MIT"
] | 2 | 2022-02-19T06:47:34.000Z | 2022-02-27T10:42:14.000Z | src/pages/adaptations.js | yury-n/adaptiff | 6b0e6c0049e9c8b63f9f5d967a80811552e57661 | [
"MIT"
] | 1 | 2019-11-18T06:42:30.000Z | 2019-11-18T06:42:30.000Z | import linearGradient from "../_adaptationConfigs/linearGradient";
import radialGradient from "../_adaptationConfigs/radialGradient";
import trianglify from "../_adaptationConfigs/trianglify";
import particles from "../_adaptationConfigs/particles";
import perfectPurple from "../_adaptationConfigs/perfect_purple";
import wallPattern from "../_adaptationConfigs/wallPattern";
import strings25 from "../_adaptationConfigs/strings25";
import generateArt from "../_adaptationConfigs/generateArt";
import gradientWaves from "../_adaptationConfigs/gradientWaves";
import postmodern from "../_adaptationConfigs/postmodern";
import mesh from "../_adaptationConfigs/mesh";
import steppedGradient from "../_adaptationConfigs/steppedGradient";
import fiberRibbons from "../_adaptationConfigs/fiber_ribbons";
import fiberRectangles from "../_adaptationConfigs/fiber_rectangles";
import gradientBubbles from "../_adaptationConfigs/gradient_bubbles";
import chromaticLiquids from "../_adaptationConfigs/chromatic_liquids";
import blobmaker from "../_adaptationConfigs/blobmaker";
import subtleRib from "../_adaptationConfigs/subtle_rib";
import clipSpace3d from "../_adaptationConfigs/clipSpace3d";
import voronoi from "../_adaptationConfigs/voronoi";
import carpet from "../_adaptationConfigs/carpet";
import blank from "../_adaptationConfigs/blank";
import simpleRipple from "../_adaptationConfigs/simple_ripple";
import hedgehog from "../_adaptationConfigs/hedgehog";
import tatters from "../_adaptationConfigs/tatters";
// import cells from "../_adaptationConfigs/cells";
// import fog from "../_adaptationConfigs/fog";
import svgs from "./svgsList";
import pngs from "./pngList";
import waterpipe from "../_adaptationConfigs/waterpipe";
export const allAdaptationTypes = [
linearGradient,
radialGradient,
trianglify,
particles,
perfectPurple,
wallPattern,
strings25,
generateArt,
gradientWaves,
postmodern,
mesh,
steppedGradient,
fiberRibbons,
fiberRectangles,
gradientBubbles,
chromaticLiquids,
blobmaker,
subtleRib,
clipSpace3d,
voronoi,
carpet,
blank,
hedgehog,
waterpipe
// cells,
// fog
];
const unfilledGradientWaves = {
...gradientWaves,
thumb: "/thumbs/b18.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
amplituteX: 300,
amplituteY: 30,
crazyness: false,
fill: false,
lines: 100,
palette: ["#ff0099", "#ffe000"],
smoothness: 13,
randomValues: []
}
}
};
export const allAdaptations = [
// 0
{
...linearGradient,
thumb: "/thumbs/18.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
angle: 200,
direction: "top",
palette: ["#081027", "#0d1f52"]
},
insertedItems: [
{
id: 100,
type: "object",
showIframe: true,
adaptation: gradientWaves,
width: 1018.9873417721519,
height: 373.4177215189874,
position: { left: -4.219409282700422, top: -29.535864978902953 },
configValues: {
amplituteX: 200,
amplituteY: 16,
fill: false,
lines: 10,
palette: ["#402eff", "#5c4dfb"],
randomValues: [],
smoothness: 22
}
},
{
id: 101,
type: "text",
configValues: {
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
color: "#ffffff",
fontFamily: "Prata",
fontSize: 96,
isBold: false,
letterSpacing: 0,
padding: 10
},
text: "Catch the next wave",
position: { left: 25.31645569620253, top: 388.18565400843886 }
},
{
id: 102,
type: "object",
showIframe: true,
adaptation: gradientWaves,
width: 1002.1097046413503,
height: 341.7721518987342,
position: { left: 3.3783783783783785, top: 652.0270270270271 },
configValues: {
amplituteX: 200,
amplituteY: 16,
fill: false,
lines: 10,
palette: ["#4937ff", "#e4eef0"],
randomValues: [],
smoothness: 22
}
},
{
id: 103,
type: "text",
configValues: {
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
color: "#ffffff",
fontFamily: "Roboto",
fontSize: 35,
letterSpacing: 0,
padding: 10
},
text: "learn how to catch an unbroken wave",
position: { left: 196.20253164556962, top: 529.535864978903 }
}
]
}
},
// 1
{
...linearGradient,
thumb: "/thumbs/16.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#0b0a21", "#1e1b57"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
id: 100,
type: "object",
showIframe: true,
adaptation: linearGradient,
width: 943.5483870967741,
height: 943.5483870967741,
position: { left: 23.647513440860216, top: 26.965725806451612 },
configValues: {
angle: 31,
direction: "custom_angle",
palette: ["#a52bf8", "#02d0ea"]
}
},
{
id: 101,
type: "object",
showIframe: true,
adaptation: gradientWaves,
width: 885.752688172043,
height: 888.4408602150538,
position: { left: 50.676243279569896, top: 57.522681451612904 },
configValues: {
amplituteX: 88,
amplituteY: 10,
fill: false,
lines: 67,
palette: ["#cf91f9", "#02d0ea"],
randomValues: [0.044420196340127394, 0.22911748347161964],
smoothness: 12
}
},
{
id: 103,
type: "text",
position: { left: 235.55107526881721, top: 263.3778561827957 },
configValues: {
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
color: "#ffffff",
fontFamily: "Monoton",
fontSize: 150,
letterSpacing: 0,
padding: 10
},
text: "what\nso\nnot",
width: 527.1337365591398,
height: 511.9287634408602
}
]
}
},
// 2
{
...gradientBubbles,
thumb: "/thumbs/11.png",
initState: {
size: { width: 600, height: 600 },
configValues: {
angle: 360,
itemSize: 10,
itemType: "circle",
itemsNumInRow: 16,
padding: 50,
palette: ["#dba430", "#921000"],
randomValues: [],
rounding: 20
},
insertedItems: [
{
id: 101,
width: 650,
height: 468,
showIframe: true,
type: "object",
position: { left: -97, top: 55 },
adaptation: blobmaker,
configValues: {
angle: 86,
complexity: 11,
contrast: 4,
palette: ["#921000", "#dba430"],
randomValues: [
0.3519936882860435,
0.5840141658750502,
0.08831844898281593,
0.9505707548326048,
0.3508100193181387,
0.4602954235225203,
0.9476222836166059,
0.45153414683098303,
0.7071476224937401,
0.2609440704641621
]
}
},
{
configValues: {
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
color: "#d7ff00",
fontFamily: "Rubik Mono One",
fontSize: 43,
letterSpacing: 0,
padding: 10
},
id: 102,
type: "text",
position: { left: 68.75, top: 184.375 },
text: `+
add
blobs
anywhere`
}
]
}
},
// 3
{
...gradientWaves,
thumb: "/thumbs/9.png",
id: 3,
initState: {
size: { width: 700, height: 700 },
configValues: {
amplituteX: 150,
amplituteY: 30,
crazyness: false,
fill: true,
lines: 70,
palette: ["#00fb94", "#006b65"],
smoothness: 98,
randomValues: []
},
insertedItems: [
{
id: 100,
type: "text",
configValues: {
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 1,
color: "#ffffff",
fontFamily: "El Messiri",
fontSize: 87,
letterSpacing: 0,
padding: 50
},
position: { left: 122, top: 120 },
text: `We
should
all be
designers`
}
]
}
},
// 4
{
...fiberRibbons,
thumb: "/thumbs/7.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
backgroundColor: "#324444",
palette: ["#A2CCB6", "#FCEEB5", "#fff", "#EE786E"],
numLines: 94,
fov: 75
},
insertedItems: [
{
id: 100,
type: "text",
configValues: {
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
color: "#ffffff",
fontFamily: "Playfair Display",
fontSize: 220,
letterSpacing: 0,
padding: 10,
borderWidth: 0
},
position: { left: 166.125, top: 132.65625 },
text: "React\nThree\nFiber",
width: 600.8125,
height: 746
}
]
}
},
// 5
{
...linearGradient,
thumb: "/thumbs/19.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#f9f9f9", "#ffffff"],
direction: "left",
angle: 200
},
insertedItems: [
{
id: 102,
type: "object",
width: 653,
height: 711,
showIframe: true,
adaptation: subtleRib,
configValues: { color: "#fcd633", mode: "vertical", intensity: 20 },
position: { left: 345, top: 0 }
},
{
id: 103,
type: "text",
configValues: {
fontFamily: "Lato",
fontSize: 34,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0.5 },
borderWidth: 1,
isBold: true
},
width: 161.875,
height: 96,
position: { left: 120, top: 60 },
text: "Design\nSystems"
},
{
id: 104,
type: "text",
configValues: {
fontFamily: "Lato",
fontSize: 72,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isBold: true
},
width: 620.234375,
height: 257,
position: { left: 121, top: 455 },
text: "A comprehensive\nguide to\niconography"
},
{
id: 5,
type: "text",
configValues: {
fontFamily: "Lato",
fontSize: 28,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isBold: false
},
width: 205.21875,
height: 50,
position: { left: 123, top: 716 },
text: "featured article"
},
{
id: 6,
type: "text",
configValues: {
fontFamily: "Lato",
fontSize: 20,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isBold: false
},
width: 170.078125,
height: 42,
position: { left: 441, top: 922 },
text: "by Steve Robsky"
}
]
}
},
// 6
{
...linearGradient,
thumb: "/thumbs/19.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#f9f9f9", "#ffffff"],
direction: "left",
angle: 200
},
insertedItems: [
{
id: 102,
type: "object",
width: 653,
height: 711,
showIframe: true,
adaptation: subtleRib,
configValues: { color: "#fcd633", mode: "vertical", intensity: 20 },
position: { left: 345, top: 0 }
},
{
id: 103,
type: "text",
configValues: {
fontFamily: "Lato",
fontSize: 34,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0.5 },
borderWidth: 1,
isBold: true
},
width: 161.875,
height: 96,
position: { left: 120, top: 60 },
text: "Design\nSystems"
},
{
id: 104,
type: "text",
configValues: {
fontFamily: "Lato",
fontSize: 72,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isBold: true
},
width: 620.234375,
height: 257,
position: { left: 121, top: 455 },
text: "A comprehensive\nguide to\niconography"
},
{
id: 5,
type: "text",
configValues: {
fontFamily: "Lato",
fontSize: 28,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isBold: false
},
width: 205.21875,
height: 50,
position: { left: 123, top: 716 },
text: "featured article"
},
{
id: 6,
type: "text",
configValues: {
fontFamily: "Lato",
fontSize: 20,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isBold: false
},
width: 170.078125,
height: 42,
position: { left: 441, top: 922 },
text: "by Steve Robsky"
}
]
}
},
// 7
{
...strings25,
thumb: "/thumbs/15.png",
thumbBackgroundSize: "cover",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#d8f1ff", "#000"],
sizePercent: [25, 39],
randomValues: [0.39245358845393374]
},
insertedItems: [
{
id: 100,
type: "text",
configValues: {
fontFamily: "Poppins",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
color: "#000",
fontSize: 50,
padding: 3,
borderWidth: 0
},
position: { left: 347.4672379032258, top: 386.1097110215054 },
text: "create",
width: 170.9719422043011,
height: 59.72782258064516
},
{
id: 101,
type: "text",
configValues: {
fontFamily: "Poppins",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
color: "#000",
fontSize: 64,
padding: 3,
borderWidth: 0
},
position: { left: 344.77906586021504, top: 455.68716397849465 },
text: "something",
width: 350.44942876344084,
height: 75.85685483870968
},
{
id: 102,
type: "text",
configValues: {
fontFamily: "Roboto",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
color: "#000",
isBold: true,
fontSize: 69,
padding: 3,
borderWidth: 0
},
position: { left: 346.12315188172045, top: 544.0818212365591 },
text: "unique",
width: 232.08585349462365,
height: 81.23319892473118
}
]
}
},
// 8
{
...gradientWaves,
thumb: "/thumbs/n13.png",
defaultLayout: 0,
thumbBackgroundSize: "cover",
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ff9855", "#bb045d"],
lines: 13,
amplituteX: 148,
amplituteY: 200,
smoothness: 6,
fill: true,
randomValues: [0.5269907429385214, 0.44993152499044275]
},
insertedItems: []
}
},
// 9
{
...postmodern,
thumb: "/thumbs/14.png",
thumbBackgroundSize: "cover",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#dec7f9", "#693e97", "#2a013e"],
count: 100,
lineWidth: 74,
randomValues: [0.9799188025715417]
},
insertedItems: []
}
},
// 10
unfilledGradientWaves,
// 11
{
...chromaticLiquids,
thumb: "/thumbs/b17.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: [
"#1eaa89",
"#60d1a3",
"#9ef2c4",
"#ffff76",
"#7a84a3",
"#7a84a3"
]
}
}
},
// 12
{
...gradientWaves,
thumb: "/thumbs/b16.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
amplituteX: 60,
amplituteY: 60,
crazyness: true,
fill: true,
lines: 24,
palette: ["#ad42a5", "#fad18f"],
smoothness: 1,
randomValues: [Math.random(), Math.random()]
}
}
},
// 13
{
...fiberRibbons,
thumb: "/thumbs/b15.png",
initState: {
size: { width: 700, height: 700 },
configValues: {
backgroundColor: "#ffffff",
fov: 166,
numLines: 100,
palette: ["#9b50ed", "#69d5ff", "#ffbd6e", "#ff77bc"]
}
}
},
// 14
{
...clipSpace3d,
thumb: "/thumbs/b14.png",
initState: {
size: { width: 930, height: 930 },
configValues: {
bumpStrength: 88,
objectColor: "#050504",
objectShininess: 200,
lightColor: "#ffffff",
backgroundColor: "#ffd1d1",
envPower: 2,
envBlur: 0,
camX: 0,
camY: 2,
camZ: -30,
camZoom: 0
}
}
},
// 15
{
...linearGradient,
title: "multiple elements",
author: "multiple authors",
thumb: "/thumbs/b13.png",
initState: {
size: { width: 600, height: 500 },
configValues: {
angle: 200,
direction: "custom_angle",
palette: ["#c95c46", "#511414"]
},
insertedItems: [
{
id: 100,
type: "object",
showIframe: true,
adaptation: gradientWaves,
width: 571,
height: 468,
position: { left: 15, top: 16 },
configValues: {
amplituteX: 60,
amplituteY: 60,
fill: false,
lines: 10,
palette: ["#e9db6d", "#c95c46"],
randomValues: [0.1329382981666447, 0.5229732095475299],
smoothness: 10
}
}
]
}
},
// 16
{
...mesh,
thumb: "/thumbs/b28.png",
defaultLayout: 4,
textColor: "#000",
textBackgroundColor: "rgba(255, 255, 255, 0.5)",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
distanceBetween: 7,
palette: ["#fff", "#000"]
}
}
},
// 17
{ ...clipSpace3d, thumb: "/thumbs/b24.png" },
// 18
{ ...blobmaker, thumb: "/thumbs/b22.png" },
// 19
{
...subtleRib,
thumb: "/thumbs/b23.png",
initState: {
configValues: { color: "#c1bbf2" },
size: { width: 600, height: 500 }
}
},
// 20
{ ...trianglify, thumb: "/thumbs/b29.png" },
// 21
{ ...particles, thumb: "/thumbs/b25.png" },
// 22
{
...gradientWaves,
textColor: "#fff",
defaultLayout: 0,
thumb: "/thumbs/b27.png",
initState: { configValues: {}, size: { width: 1000, height: 1000 } }
},
// 23
{
...gradientBubbles,
thumb: "/thumbs/b26.png",
initState: { configValues: {}, size: { width: 600, height: 500 } }
},
// 24
{ ...strings25 },
// 25
{
...mesh,
defaultLayout: 1,
textColor: "#ffcf2c",
initState: { configValues: {}, size: { width: 1080, height: 1080 } }
},
// 26
{ ...fiberRibbons },
// 27
{
...steppedGradient,
initState: { configValues: {}, size: { width: 600, height: 600 } }
},
// 28
{ ...perfectPurple },
// 29
{
...chromaticLiquids,
initState: { configValues: {}, size: { width: 1000, height: 660 } }
},
// 30
{
...fiberRectangles,
initState: { configValues: {}, size: { width: 700, height: 500 } }
},
// 31
{
...generateArt,
initState: { configValues: {}, size: { width: 500, height: 500 } }
},
// 32
{ ...wallPattern },
// 33
{
...gradientBubbles,
thumb: "/thumbs/b21.png",
initState: {
size: { width: 800, height: 800 },
configValues: {
palette: ["#1c004e", "#00aaff"],
itemSize: 31,
itemsNumInRow: 25,
padding: 1,
angle: 146,
itemType: "circle",
rounding: 20,
randomValues: [0.34505942052567407]
},
insertedItems: []
}
},
// 34
{
...particles,
thumb: "/thumbs/b20.png",
initState: {
size: { width: 600, height: 600 },
configValues: {
maxParticles: 200,
palette: ["#f46c94", "#fedf35", "#ffffff"],
sizeVariations: 24
}
}
},
// 35
{ ...linearGradient },
// 36
{ ...postmodern },
// 37
{
...voronoi,
initState: { configValues: {}, size: { width: 1000, height: 1000 } }
},
// 38
{
...linearGradient,
thumb: "/thumbs/38.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#00040e", "#470090"],
direction: "top",
angle: 200
},
insertedItems: [
{
id: 302,
type: "object",
showIframe: true,
adaptation: gradientWaves,
width: 1002.1029609690444,
height: 341.7521870794078,
position: { left: -0.9463324360699865, top: 318.703734858681 },
configValues: {
amplituteX: 200,
amplituteY: 16,
fill: false,
lines: 10,
palette: ["#4937ff", "#4937ff"],
randomValues: [],
smoothness: 22
}
},
{
id: 202,
type: "object",
width: 875.9883916554509,
height: 303.98300807537015,
showIframe: true,
adaptation: voronoi,
configValues: {
palette: ["#20ff06", "#f9f9f9"],
filled: true,
lineWidth: 5,
minMaxRadius: [2, 6]
},
position: { left: 61.67984522207268, top: 335.67462987886944 }
},
{
id: 203,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Righteous",
fontSize: 100,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0
},
width: 587.7145020188425,
height: 128.9956258411844,
position: { left: 201.14821668909826, top: 212.90376850605654 },
text: "I don't know"
},
{
id: 204,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Righteous",
fontSize: 100,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0
},
width: 643.3378196500673,
height: 128.9956258411844,
position: { left: 181.33832436069986, top: 634.3581763122477 },
text: "what this is..."
}
]
}
},
// 39
{
...carpet,
initState: { configValues: {}, size: { width: 1000, height: 1000 } }
},
// 40
{
...gradientWaves,
thumb: "/thumbs/40.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#18faff", "#7b2dd6"],
lines: 13,
amplituteX: 58,
amplituteY: 30,
smoothness: 100,
fill: true,
randomValues: []
},
insertedItems: [
{
id: 302,
type: "object",
width: 994.5652173913043,
height: 990.9420289855071,
showIframe: true,
adaptation: gradientWaves,
configValues: {
palette: ["#18faff", "#ffffff"],
lines: 13,
amplituteX: 10,
amplituteY: 10,
smoothness: 100,
fill: false,
randomValues: []
},
position: { left: 2.915534420289855, top: 3.87794384057971 }
}
]
}
},
// 41
{
...linearGradient,
thumb: "/thumbs/41.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#ef76a7", "#d01200"],
lines: 13,
amplituteX: 58,
amplituteY: 30,
smoothness: 100,
fill: true,
randomValues: []
},
insertedItems: [
{
id: 302,
type: "object",
width: 994.5625,
height: 994.5625,
showIframe: true,
adaptation: gradientWaves,
configValues: {
palette: ["#ffffff", "#d01200"],
lines: 13,
amplituteX: 36,
amplituteY: 20,
smoothness: 100,
fill: false,
randomValues: []
},
position: { left: 1.28125, top: 2.25 }
},
{
id: 202,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oswald",
fontSize: 81,
padding: 10,
letterSpacing: 0,
color: "#fefefe",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
hasCyrillic: true
},
width: 709.640625,
height: 376,
position: { left: 40.03125, top: 587.140625 },
text:
"я запускаю\nв проволочный космос\nсвой медный грош, \nувенчанный гербом\n"
},
{
id: 304,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Barriecito",
fontSize: 100,
padding: 10,
letterSpacing: 0,
color: "#fefefe",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
hasCyrillic: true
},
width: 220,
height: 130,
position: { left: 716.640625, top: 28.21875 },
text: "1987"
},
{
id: 102,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Roboto Condensed",
fontSize: 49,
padding: 10,
letterSpacing: 0,
color: "#fefefe",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
hasCyrillic: true
},
width: 309.921875,
height: 73,
position: { left: 29, top: 32 },
text: "Постскриптум"
},
{
id: 103,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Roboto Condensed",
fontSize: 35,
padding: 10,
letterSpacing: 0,
color: "#fefefe",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
hasCyrillic: true
},
width: 236.515625,
height: 58,
position: { left: 32, top: 92 },
text: "И. А. Бродский"
}
]
}
},
// 42
{
...blank,
thumb: "/thumbs/42.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: { transparent: false, color: "#ffffff" },
insertedItems: [
{
id: 303,
type: "object",
width: 1052.528578528827,
height: 1220.9865805168986,
showIframe: true,
adaptation: mesh,
configValues: {
withBackground: false,
palette: ["#593c2e", "#ffcf2c"],
color: "#000",
distanceBetween: 17,
randomValues: [0.9723743823562034]
},
position: { left: 87.66153081510934, top: -118.84940357852882 }
},
{
id: 302,
type: "object",
width: 508.94632206759445,
height: 1009.9403578528827,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#fbcd33", "#bb384e"],
direction: "custom_angle",
angle: 200
},
position: { left: -1.8327534791252484, top: -3.789761431411531 }
},
{
id: 202,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Seymour One",
fontSize: 100,
padding: 10,
letterSpacing: 0,
color: "#6b4a7a",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
hasCyrillic: true,
isBold: true
},
width: 687.0961729622267,
height: 129.28677932405566,
position: { left: 122.26640159045725, top: 386.67992047713716 },
text: "Хаос лиц"
},
{
id: 102,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Seymour One",
fontSize: 57,
padding: 10,
letterSpacing: 0,
color: "#fbcd33",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
hasCyrillic: true,
isBold: true
},
width: 739.5004970178926,
height: 81.57306163021869,
position: { left: 58.64811133200795, top: 492.04771371769385 },
text: "и не видно тропы"
},
{
id: 102,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Montserrat",
fontSize: 33,
padding: 10,
letterSpacing: 0,
color: "#fefefe",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
hasCyrillic: true,
isBold: true
},
width: 266.49420529801324,
height: 55.753311258278146,
position: { left: 133.11258278145695, top: 915.8940397350993 },
text: "И.А. Бродский"
}
]
}
},
// 43
{
...linearGradient,
thumb: "/thumbs/n43.png",
defaultLayout: 0,
textColor: "#fff",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#fbcac4", "#45618a"],
direction: "top",
angle: 200
},
insertedItems: [
{
id: 302,
type: "object",
width: 994.984375,
height: 994.984375,
showIframe: true,
adaptation: mesh,
configValues: {
withBackground: false,
palette: ["#593c2e", "#ffcf2c"],
color: "#ffffff",
distanceBetween: 7,
randomValues: [0.5307371650983657]
},
position: { left: 5.640625, top: 6.625 }
}
]
}
},
// 44
{
...blank,
thumb: "/thumbs/44.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: { transparent: false, color: "#ffffff" },
insertedItems: [
{
id: 202,
type: "object",
width: 1011,
height: 1025,
showIframe: true,
adaptation: trianglify,
configValues: {
palette: ["#ffffff", "#ffffff", "#ffffff", "#00ffc5"],
cell_size: 72,
variance: 100
},
position: { left: 44, top: 33 }
},
{
id: 203,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Old Standard TT",
fontSize: 67,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
hasCyrillic: true,
isBold: true
},
width: 824.28125,
height: 312,
position: { left: 129, top: 377 },
text:
"Улиц недвижность идолья,\nкамни, выдолбы…\nЕсли бы их не видел я —\nчто я видел бы?"
},
{
id: 102,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Vollkorn",
fontSize: 37,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
hasCyrillic: true,
isBold: true
},
width: 293.25,
height: 60,
position: { left: 133, top: 92 },
text: "Дмитрий Быков"
}
]
}
},
// 45
{
...simpleRipple,
thumb: "/thumbs/45.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {}
}
},
// 46
{
...hedgehog,
thumb: "/thumbs/46.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {}
}
},
// 47
{
...carpet,
thumb: "/thumbs/47.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#fff", "#256eb0", "#eca5b3"],
rotate: 113,
cellCount: 5,
innerRectSide: 984
},
insertedItems: []
}
},
// 48
{
...blank,
thumb: "/thumbs/48.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: { transparent: false, color: "#ffffff" },
insertedItems: [
{
id: 302,
type: "object",
width: 1084,
height: 562,
showIframe: true,
adaptation: trianglify,
configValues: {
palette: ["#fe0057", "#82003b", "#270b1d"],
cell_size: 70,
variance: 100
},
position: { left: 2, top: 2 }
},
{
id: 303,
type: "object",
width: 1086,
height: 522,
showIframe: true,
adaptation: trianglify,
configValues: {
palette: ["#000e1e", "#0316b0", "#001bff"],
cell_size: 50,
variance: 100
},
position: { left: 1, top: 570 }
},
{
id: 304,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oranienbaum",
fontSize: 120,
padding: 10,
letterSpacing: 0,
color: "#fefefe",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true,
isBold: false
},
width: 455,
height: 164,
position: { left: 323, top: 156 },
text: "Alter Ego"
},
{
id: 305,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oranienbaum",
fontSize: 51,
padding: 10,
letterSpacing: 0,
color: "#f9b7cd",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true,
isBold: false
},
width: 449.171875,
height: 81,
position: { left: 324, top: 319 },
text: "Men's clothing brand"
},
{
id: 202,
type: "object",
width: 1082,
height: 518,
showIframe: true,
adaptation: voronoi,
configValues: {
palette: ["#3449f7", "#000849"],
filled: true,
lineWidth: 5,
minMaxRadius: [2, 4]
},
position: { left: 2, top: 573 }
},
{
id: 203,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Lora",
fontSize: 120,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12
},
width: 305.609375,
height: 164,
position: { left: 388, top: 654 },
text: "-70%"
},
{
id: 204,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oranienbaum",
fontSize: 76,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
width: 398.109375,
height: 111,
position: { left: 353, top: 817 },
text: "Ликвидация"
},
{
id: 205,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oranienbaum",
fontSize: 52,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
width: 554.5625,
height: 82,
position: { left: 278, top: 924 },
text: "Всей мужской коллекции"
}
]
}
},
// 49
{
...hedgehog,
thumb: "/thumbs/49.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
withBackground: true,
backgroundColor: "#105956",
strokeColor: { r: "66", g: "205", b: "166", a: "0.62" },
randomValues: [0.3390192027783483]
},
insertedItems: [
{
id: 202,
type: "object",
width: 540,
height: 540,
showIframe: true,
adaptation: simpleRipple,
configValues: {
palette: ["#105956", "#105956"],
itemsNum: 62,
strokeWidth: 3,
radius: 100,
fullyFitInside: true
},
position: { left: 92.85726127320955, top: 38.85278514588859 }
},
{
id: 203,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oswald",
fontSize: 73,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 249, g: 249, b: 249, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
width: 649.6875,
height: 107.33753315649867,
position: { left: 190.86206896551724, top: 243.85941644562334 },
text: "Меньше — это больше"
},
{
id: 204,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oswald",
fontSize: 40,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 249, g: 249, b: 249, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
width: 271.1190318302387,
height: 114.49933687002653,
position: { left: 199.8590848806366, top: 353.86024535809014 },
text: "чистота формы\nв виде принципа"
},
{
id: 205,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Roboto Condensed",
fontSize: 27,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 249, g: 249, b: 249, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
width: 674.6195291777188,
height: 51.47546419098143,
position: { left: 211.09416445623341, top: 976.1762267904509 },
text: "современные технологии способны загромоздить дизайн"
}
]
}
},
// 50
{
...carpet,
thumb: "thumbs/50.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#fff", "#6f86d6", "#48c6ef"],
rotate: 113,
cellCount: 5,
innerRectSide: 1352,
randomValues: [0.47419615552278005]
},
insertedItems: [
{
id: 302,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Pacifico",
fontSize: 51,
padding: 33,
letterSpacing: 2,
color: "#3e3c3c",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
hasCyrillic: true,
isBold: false
},
width: 249.54409814323608,
height: 121.684350132626,
position: { left: 768.215351458886, top: 883.9522546419098 },
text: "И.А.Б."
},
{
id: 102,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Rubik",
fontSize: 60,
padding: 33,
letterSpacing: 2,
color: "#3e3c3c",
backgroundColor: { r: 255, g: 255, b: 255, a: 0.64 },
borderWidth: 0,
hasCyrillic: true,
isBold: false,
textAlign: "center"
},
width: 841.4704907161804,
height: 260.9416445623342,
position: { left: 88.85941644562334, top: 354.1114058355438 },
text:
"Остановись мгновение!\nТы не столь прекрасно,\nсколько ты неповторимо."
}
]
}
},
// 51
{
...trianglify,
thumb: "thumbs/n51.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ffee00", "#0085c7", "#150f49", "#070d40"],
cell_size: 80,
variance: 100
},
insertedItems: [
{
id: 203,
type: "object",
width: 1074,
height: 1076,
showIframe: true,
adaptation: voronoi,
configValues: {
palette: ["#ffee00", "#0085c7", "#9cbaed"],
filled: true,
lineWidth: 5,
minMaxRadius: [2, 3]
},
position: { left: 4, top: 0 }
}
]
}
},
// 52
{
...linearGradient,
thumb: "thumbs/52.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#6d107e", "#f03358"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
id: 301,
type: "object",
width: 1000,
height: 1000,
showIframe: true,
adaptation: voronoi,
configValues: {
palette: ["#ffee00", "#f03358", "#cee1ff"],
filled: true,
lineWidth: 5,
minMaxRadius: [9, 25]
},
position: { left: 3.3222591362126246, top: 3.3222591362126246 }
},
{
id: 102,
type: "object",
width: 885.3820598006645,
height: 784.0531561461794,
showIframe: true,
adaptation: simpleRipple,
configValues: {
palette: ["#ffffff", "#ffffff"],
itemsNum: 32,
strokeWidth: 3,
radius: 100,
fullyFitInside: true
},
position: { left: 61.461794019933556, top: 144.51827242524917 }
},
{
id: 302,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Yanone Kaffeesatz",
fontSize: 67,
padding: 130,
letterSpacing: 0,
color: "#000",
backgroundColor: "#ffffff",
borderWidth: 0,
borderRadius: 300,
isInline: false,
lineHeight: 12,
hasCyrillic: true,
textAlign: "center"
},
width: 599.9792358803987,
height: 578.9036544850499,
position: { left: 207.38164451827242, top: 243.64098837209303 },
text: "Обе стороны \nмоей натуры \nобладали \nобщей памятью"
}
]
}
},
// 53
{
...tatters,
thumb: "thumbs/53.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {}
}
},
// 54
{
...linearGradient,
thumb: "thumbs/54.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#ff9a8b", "#6148aa"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
id: 502,
type: "object",
width: 994.5494186046512,
height: 994.5494186046512,
showIframe: true,
adaptation: gradientWaves,
configValues: {
palette: ["#f6d365", "#fda085"],
lines: 38,
amplituteX: 36,
amplituteY: 20,
smoothness: 100,
fill: false,
randomValues: []
},
position: { left: 6.592607973421927, top: 7.552948504983389 }
},
{
id: 102,
type: "object",
width: 1898.671096345515,
height: 378.7375415282392,
showIframe: true,
adaptation: svgs[3],
configValues: { palette: ["#F1EAB9", "#FF8C8C"] },
position: { left: -611.295681063123, top: 823.9202657807309 }
},
{
id: 103,
type: "object",
width: 1724.2524916943523,
height: 343.8538205980067,
showIframe: true,
adaptation: svgs[3],
configValues: { palette: ["#F1EAB9", "#FF8C8C"] },
position: { left: -511.6279069767442, top: -124.58471760797343 }
}
]
}
},
// 55
{
...trianglify,
thumb: "thumbs/55.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#453ff4", "#49b8e9", "#ffffff", "#fe96fc"],
cell_size: 80,
variance: 0
},
insertedItems: []
}
},
// 56
{
...clipSpace3d,
thumb: "thumbs/56.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
bumpStrength: 200,
objectColor: "#3b2001",
objectShininess: 29,
lightColor: "#ff0000",
backgroundColor: "#b7b7b7",
envPower: 7,
envBlur: 0,
camX: 10,
camY: 39,
camZ: -15,
camZoom: 7
},
insertedItems: []
}
},
// 57
{
...particles,
thumb: "/thumbs/57.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
maxParticles: 163,
palette: ["#572949", "#fbda2b", "#ff8804"],
sizeVariations: 18
}
}
},
// 58
{
...linearGradient,
thumb: "/thumbs/58.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#7be4da", "#cefbee"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
id: 204,
type: "object",
width: 995.9877938517178,
height: 991.9755877034357,
showIframe: true,
adaptation: simpleRipple,
configValues: {
palette: ["#7be4da", "#015079"],
itemsNum: 47,
strokeWidth: 1,
radius: 100,
fullyFitInside: true
},
position: { left: 4.605560578661844, top: 5.594484629294755 }
},
{
id: 202,
type: "object",
width: 981.9168173598553,
height: 987.3417721518987,
showIframe: true,
adaptation: simpleRipple,
configValues: {
palette: ["#7be4da", "#fbfdff"],
itemsNum: 2,
strokeWidth: 21,
radius: 100,
fullyFitInside: true
},
position: { left: 11.415009041591318, top: 7.826627486437612 }
}
]
}
},
// 59
{
...clipSpace3d,
thumb: "/thumbs/59.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
bumpStrength: 200,
objectColor: "#ebc4c4",
objectShininess: 12,
lightColor: "#ee754e",
backgroundColor: "#ffcece",
envPower: 2,
envBlur: 0,
camX: -15,
camY: 0,
camZ: -50,
camZoom: 3
},
insertedItems: []
}
},
// 60
{
...chromaticLiquids,
thumb: "/thumbs/60.png",
initState: {
size: { width: 1080, height: 607 },
configValues: {
palette: [
"#e87a7a",
"#8c4f7f",
"#8c75a5",
"#babfd6",
"#8c75a5",
"#babfd6"
]
},
insertedItems: [
{
id: 102,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Roboto Condensed",
fontSize: 72,
padding: 10,
letterSpacing: 0,
color: "#591f4d",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 10,
hasCyrillic: true,
textAlign: "right",
isBold: true,
isItalic: true
},
width: 390.875,
height: 164,
position: { left: 584, top: 263.5 },
text: "конструктор\nдизайна"
},
{
id: 104,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Roboto Condensed",
fontSize: 64,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 10,
hasCyrillic: true,
textAlign: "left",
isBold: true,
isItalic: true
},
width: 477.78125,
height: 148,
position: { left: 94, top: 139.5 },
text: "легкий\nв использовании"
}
]
}
},
// 61
{
...linearGradient,
title: "multiple elements",
author: "multiple authors",
thumb: "/thumbs/61.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#7be4da", "#094a6f"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
id: 104,
type: "object",
width: 996,
height: 992,
showIframe: true,
adaptation: simpleRipple,
configValues: {
palette: ["#7be4da", "#094a6f"],
itemsNum: 47,
strokeWidth: 1,
radius: 100,
fullyFitInside: true
},
position: { left: 6.089743589743589, top: 7.091346153846153 }
},
{
id: 202,
type: "object",
width: 548.9983974358975,
height: 562.9807692307692,
showIframe: true,
adaptation: simpleRipple,
configValues: {
palette: ["#1bfbe8", "#005482"],
itemsNum: 8,
strokeWidth: 4,
radius: 100,
fullyFitInside: true
},
position: { left: 228.125, top: 219.1105769230769 }
},
{
id: 103,
type: "object",
width: 725.6410256410256,
height: 725.6410256410256,
showIframe: true,
adaptation: svgs[1],
configValues: {
palette: [{ r: 255, g: 150, b: 101, a: 0 }, "#f90005"]
},
position: { left: 135.89743589743588, top: 158.97435897435898 }
},
{
id: 102,
type: "object",
width: 500,
height: 500,
showIframe: true,
adaptation: svgs[0],
configValues: {
palette: [{ r: 255, g: 150, b: 101, a: 0 }, "#ff0003"]
},
position: { left: 35.8974358974359, top: 264.1025641025641 }
}
]
}
},
// 62
{
...gradientWaves,
thumb: "/thumbs/62.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
amplituteX: 150,
amplituteY: 30,
crazyness: false,
fill: true,
lines: 70,
palette: ["#fde8c8", "#ff7f92"],
smoothness: 98,
randomValues: []
},
insertedItems: []
}
},
// 63
{
...fiberRibbons,
thumb: "/thumbs/7.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
backgroundColor: "#324444",
palette: ["#A2CCB6", "#FCEEB5", "#fff", "#EE786E"],
numLines: 94,
fov: 75
},
insertedItems: [
{
id: 100,
type: "text",
configValues: {
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
color: "#ffffff",
fontFamily: "Playfair Display",
fontSize: 220,
letterSpacing: 0,
padding: 10,
borderWidth: 0
},
position: { left: 166.125, top: 132.65625 },
text: "React\nThree\nFiber",
width: 600.8125,
height: 746
}
]
}
},
// 64
{
...strings25,
thumb: "/thumbs/15.png",
thumbBackgroundSize: "cover",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#d8f1ff", "#000"],
sizePercent: [25, 39],
randomValues: [0.39245358845393374]
},
insertedItems: [
{
id: 100,
type: "text",
configValues: {
fontFamily: "Poppins",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
color: "#000",
fontSize: 50,
padding: 3,
borderWidth: 0
},
position: { left: 347.4672379032258, top: 386.1097110215054 },
text: "create",
width: 170.9719422043011,
height: 59.72782258064516
},
{
id: 101,
type: "text",
configValues: {
fontFamily: "Poppins",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
color: "#000",
fontSize: 64,
padding: 3,
borderWidth: 0
},
position: { left: 344.77906586021504, top: 455.68716397849465 },
text: "something",
width: 350.44942876344084,
height: 75.85685483870968
},
{
id: 102,
type: "text",
configValues: {
fontFamily: "Roboto",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
color: "#000",
isBold: true,
fontSize: 69,
padding: 3,
borderWidth: 0
},
position: { left: 346.12315188172045, top: 544.0818212365591 },
text: "unique",
width: 232.08585349462365,
height: 81.23319892473118
}
]
}
},
// 65
{
...linearGradient,
thumb: "/thumbs/65.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#ffffff", "#fdf9ce"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
id: 200,
type: "object",
showIframe: true,
adaptation: linearGradient,
width: 943.9421338155514,
height: 943.9421338155514,
position: { left: 27.2377938517179, top: 30.571880650994572 },
configValues: {
angle: 31,
direction: "custom_angle",
palette: ["#ffd2be", "#fdf9ce"]
}
},
{
id: 201,
type: "object",
showIframe: true,
adaptation: gradientWaves,
width: 885.7368896925858,
height: 888.4211121157323,
position: { left: 54.277802893309214, top: 61.11550632911392 },
configValues: {
amplituteX: 150,
amplituteY: 111,
fill: false,
lines: 21,
palette: ["#cf91f9", "#fb8ea8"],
randomValues: [0.3417302595458822, 0.08588410509903688],
smoothness: 67
}
},
{
type: "object",
width: 238.69801084990956,
height: 254.97287522603978,
showIframe: true,
adaptation: voronoi,
configValues: {
palette: ["#fb8ea8", "#fdf9ce"],
filled: true,
lineWidth: 5,
minMaxRadius: [1, 114]
},
id: 102,
position: { left: 31.645569620253163, top: 288.4267631103074 }
},
{
type: "object",
width: 356.2386980108499,
height: 365.2802893309222,
showIframe: true,
adaptation: voronoi,
configValues: {
palette: ["#fb8ea8", "#fdf9ce"],
filled: true,
lineWidth: 5,
minMaxRadius: [1, 114]
},
id: 103,
position: { left: 348.1012658227848, top: 348.1012658227848 }
},
{
type: "object",
width: 254.97287522603978,
height: 247.7396021699819,
showIframe: true,
adaptation: voronoi,
configValues: {
palette: ["#fb8ea8", "#fdf9ce"],
filled: true,
lineWidth: 5,
minMaxRadius: [1, 114]
},
id: 104,
position: { left: 707.9566003616636, top: 715.1898734177215 }
}
]
}
},
// 66
{
...mesh,
thumb: "/thumbs/66.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
withBackground: true,
palette: ["#496519", "#ffcf2c"],
color: "#ffffff",
distanceBetween: 10,
randomValues: [0.6312924668231186]
},
insertedItems: [
{
id: 503,
type: "object",
width: 1052.49773960217,
height: 1220.9821428571427,
showIframe: true,
adaptation: mesh,
configValues: {
withBackground: false,
palette: ["#593c2e", "#ffcf2c"],
color: "#ffffff",
distanceBetween: 17,
randomValues: [0.9723743823562034]
},
position: { left: 93.26966546112115, top: -113.21767631103073 }
},
{
id: 502,
type: "object",
width: 508.9285714285714,
height: 1009.9174954792043,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#fbcd33", "#fe002c"],
direction: "custom_angle",
angle: 200
},
position: { left: -3.4753616636528024, top: -1.8083182640144664 }
},
{
type: "object",
width: 408.9907323688969,
height: 408.9907323688969,
showIframe: true,
adaptation: svgs[2],
configValues: { palette: ["#ffffff", "#fbcd33"] },
id: 202,
position: { left: 309.67450271247736, top: 288.79407775768533 }
},
{
type: "object",
width: 262.997287522604,
height: 262.997287522604,
showIframe: true,
adaptation: svgs[2],
configValues: {
palette: ["#ffffff", { r: 251, g: 205, b: 51, a: 0 }]
},
id: 203,
position: { left: 588.2120253164557, top: 183.5160488245931 }
},
{
type: "object",
width: 234.99660940325495,
height: 234.99660940325495,
showIframe: true,
adaptation: svgs[2],
configValues: { palette: ["#ffffff", "#fbcd33"] },
id: 204,
position: { left: 211.5167269439421, top: 578.0402350813742 }
}
]
}
},
// 67
{
...linearGradient,
thumb: "/thumbs/67.png",
title: "multiple elements",
author: "multiple authors",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ffffff", "#e0e0e0"],
direction: "custom_angle",
angle: 163
},
insertedItems: [
{
type: "object",
width: 1074.2451154529308,
height: 796.0923623445826,
showIframe: true,
adaptation: svgs[8],
configValues: { color: "#000" },
id: 102,
position: { left: 0.9591474245115453, top: 144.83126110124334 }
}
]
}
},
// 68
{
...gradientBubbles,
thumb: "/thumbs/68.png",
initState: {
size: { width: 600, height: 600 },
configValues: {
palette: ["#eeb1a9", "#feedcf"],
itemSize: 10,
itemsNumInRow: 16,
padding: 50,
angle: 360,
itemType: "circle",
rounding: 20,
randomValues: []
},
insertedItems: [
{
type: "object",
width: 511.54529307282417,
height: 495.5595026642984,
showIframe: true,
adaptation: simpleRipple,
configValues: {
palette: ["#eeb1a9", "#eeb1a9"],
itemsNum: 10,
strokeWidth: 3,
radius: 100
},
id: 202,
position: { left: 47.42451154529307, top: 204.08525754884548 }
},
{
id: 301,
width: 650.088809946714,
height: 467.8507992895204,
showIframe: true,
type: "object",
position: { left: -71.43650088809946, top: 192.46225577264653 },
adaptation: blobmaker,
configValues: {
angle: 86,
complexity: 11,
contrast: 4,
palette: ["#feedcf", "#eeb1a9"],
randomValues: [
0.687925776574627,
0.5375583491513425,
0.5988404307482571,
0.704912023920562,
0.7946503042888042,
0.3338446814701215,
0.4742463712765448,
0.7740826505264262,
0.8045870599949538,
0.21409252151702107
]
}
},
{
configValues: {
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
color: "#dbff18",
fontFamily: "Rubik Mono One",
fontSize: 34,
letterSpacing: 0,
padding: 10,
hasCyrillic: true,
lineHeight: 15
},
id: 302,
type: "text",
position: { left: 81.52753108348135, top: 360.2131438721137 },
text: "когда \nвыдуманный \nмир богаче\n",
width: 337.8496891651865,
height: 170.24866785079928
},
{
type: "object",
width: 300,
height: 407.98734458259327,
showIframe: true,
adaptation: svgs[6],
configValues: { palette: ["#feedcf", "#eeb1a9"] },
id: 203,
position: { left: 3.730017761989343, top: -225.39964476021314 }
},
{
type: "object",
width: 300,
height: 407.98734458259327,
showIframe: true,
adaptation: svgs[6],
configValues: { palette: ["#feedcf", "#eeb1a9"] },
id: 204,
position: { left: 302.13143872113676, top: -227.5310834813499 }
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Faster One",
fontSize: 39,
padding: 10,
letterSpacing: 0,
color: "#feedcf",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
isBold: false
},
id: 205,
width: 327.4589253996447,
height: 65.80817051509769,
position: { left: 141.20781527531082, top: -23.97868561278863 },
text: "adaptiff.com"
},
{
configValues: {
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
color: "#dbff18",
fontFamily: "Rubik Mono One",
fontSize: 34,
letterSpacing: 4,
padding: 10,
hasCyrillic: false,
lineHeight: 13
},
id: 102,
type: "text",
position: { left: 78.3303730017762, top: 515.8081705150977 },
text: "реального",
width: 316.0690497335701,
height: 63.676731793960926
}
]
}
},
// 69
{
...linearGradient,
thumb: "/thumbs/69.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#fddabe", "#fda6f0"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 636.8738898756661,
height: 713.6056838365897,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#ffffff", "#d7e4fb"],
direction: "custom_angle",
angle: 191
},
id: 102,
position: { left: 185.11545293072825, top: 169.76909413854352 }
},
{
type: "object",
width: 113.17939609236235,
height: 224.44049733570162,
showIframe: true,
adaptation: svgs[9],
configValues: { palette: ["#ffbef4", "#ffbef4"] },
id: 103,
position: { left: 269.52042628774427, top: 68.09946714031972 }
},
{
type: "object",
width: 63.30373001776199,
height: 176.48312611012435,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#fedbbd", "#fedbbd"],
direction: "custom_angle",
angle: 200
},
id: 104,
position: { left: 267.60213143872113, top: 795.133214920071 }
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Open Sans",
fontSize: 40,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
isUnderlined: true
},
id: 105,
width: 319.27619893428067,
height: 67.9196269982238,
position: { left: 378.8632326820604, top: 915.9857904085259 },
text: "Neō Wax Bloom"
},
{
type: "object",
width: 46.03907637655418,
height: 281.98934280639435,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#ffb9c9", "#ffb9c9"],
direction: "custom_angle",
angle: 200
},
id: 106,
position: { left: 866.1101243339255, top: -39.32504440497336 }
}
]
}
},
// 70
{
...linearGradient,
title: "painted shapes",
thumb: "/thumbs/70.png",
objectPack: "Weird Painted Shapes",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ffffff", "#eee9d6"],
direction: "custom_angle",
angle: 201
},
insertedItems: [
{
type: "object",
width: 621.1764705882354,
height: 407.64705882352945,
showIframe: true,
adaptation: svgs[41],
configValues: { color: "#f8c6c5" },
position: { left: 709.4117647058823, top: 88.23529411764706 },
id: 302,
rotation: -368
},
{
type: "object",
width: 875.2941176470589,
height: 490.5882352941177,
showIframe: true,
adaptation: svgs[46],
configValues: { color: "#c5dda9" },
position: { left: 289.4117647058824, top: -217.05882352941177 },
id: 303,
rotation: 179
},
{
type: "object",
width: 291.1764705882353,
height: 171.1764705882353,
showIframe: true,
adaptation: svgs[45],
configValues: { color: "#ffffff" },
position: { left: 571.7647058823529, top: -104.11764705882354 },
id: 304,
rotation: 26
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oswald",
fontSize: 60,
padding: 34,
letterSpacing: 0,
color: "#000000",
backgroundColor: { r: 238, g: 233, b: 214, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
id: 202,
width: 928.1801470588235,
height: 138.58455882352942,
position: { left: 88.86948529411765, top: 841.40625 },
text: "Design your every day with art you love."
},
{
type: "object",
width: 483.5294117647059,
height: 317.6470588235294,
showIframe: true,
adaptation: svgs[46],
configValues: { color: "#ffffff" },
position: { left: -158.8235294117647, top: 305.29411764705884 },
id: 305,
rotation: -323
},
{
type: "object",
width: 578.8235294117648,
height: 660,
showIframe: true,
adaptation: svgs[42],
configValues: { color: "#fccf3d" },
position: { left: -236.47058823529412, top: -208.23529411764707 },
id: 402,
rotation: 0
},
{
type: "object",
width: 245.29411764705884,
height: 540,
showIframe: true,
adaptation: svgs[48],
configValues: { color: "#127e56" },
position: { left: -151.76470588235296, top: -100.58823529411765 },
id: 306,
rotation: 0
},
{
type: "object",
width: 35.294117647058826,
height: 30,
showIframe: true,
adaptation: svgs[50],
configValues: { color: "#127e56" },
position: { left: 215.29411764705884, top: 552.3529411764706 },
id: 307,
rotation: 0
},
{
type: "object",
width: 14.117647058823529,
height: 14.117647058823529,
showIframe: true,
adaptation: svgs[51],
configValues: { color: "#127e56" },
position: { left: 199.41176470588235, top: 592.9411764705883 },
id: 308,
rotation: 0
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oswald",
fontSize: 39,
padding: 20,
letterSpacing: 0,
color: "#000000",
backgroundColor: { r: 238, g: 233, b: 214, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
id: 204,
width: 195.52389705882354,
height: 85.86397058823529,
position: { left: 466.81985294117646, top: 345.88235294117646 },
text: "Inspired by"
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Fira Sans Extra Condensed",
fontSize: 100,
padding: 20,
letterSpacing: 0,
color: "#127e56",
backgroundColor: { r: 238, g: 233, b: 214, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true,
isItalic: true,
isBold: true
},
id: 102,
width: 354.1544117647059,
height: 158.21691176470588,
position: { left: 381.1764705882353, top: 492.3529411764706 },
text: "society6"
},
{
type: "object",
width: 245.29411764705884,
height: 540,
showIframe: true,
adaptation: svgs[48],
configValues: { color: "#ffffff" },
position: { left: 933.5294117647059, top: 155.29411764705884 },
id: 103,
rotation: 0
},
{
type: "object",
width: 564.7058823529412,
height: 3.5294117647058822,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: [
{ r: 6, g: 6, b: 6, a: 0 },
{ r: 64, g: 64, b: 64, a: 0.64 }
],
angle: 0
},
position: { left: 277.05882352941177, top: 776.4705882352941 },
id: 104,
rotation: 0
}
]
}
},
// 71
{
...linearGradient,
thumb: "/thumbs/71.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#6148aa", "#ff9a8b"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 1088.8235294117646,
height: 1083.5294117647059,
showIframe: true,
adaptation: "gradient_waves",
configValues: {
palette: ["#ff0099", "#ffe000"],
lines: 11,
amplituteX: 46,
amplituteY: 60,
smoothness: 4,
fill: false,
randomValues: []
},
position: { left: -5.294117647058823, top: -1.7647058823529411 },
id: 102,
rotation: 0
},
{
type: "object",
width: 1849.4117647058824,
height: 587.6470588235294,
showIframe: true,
adaptation: svgs[3],
configValues: { palette: ["#6148aa", "#e7a044"], angle: 0 },
position: { left: -635.2941176470588, top: -206.47058823529412 },
id: 103,
rotation: 0
},
{
type: "object",
width: 540,
height: 540,
showIframe: true,
adaptation: svgs[1],
configValues: {
palette: [{ r: "187", g: "239", b: "209", a: "0.16" }, "#e7a044"],
angle: 0
},
position: { left: -266.47058823529414, top: 321.1764705882353 },
id: 107,
rotation: 0
},
{
type: "object",
width: 254.11764705882354,
height: 254.11764705882354,
showIframe: true,
adaptation: svgs[1],
configValues: {
palette: [{ r: "187", g: "239", b: "209", a: "0.16" }, "#e7a044"],
angle: 0
},
position: { left: 977.6470588235294, top: 188.82352941176472 },
id: 108,
rotation: 0
},
{
type: "object",
width: 243.52941176470588,
height: 236.47058823529412,
showIframe: true,
adaptation: svgs[1],
configValues: {
palette: [{ r: "187", g: "239", b: "209", a: "0.16" }, "#e7a044"],
angle: 0
},
position: { left: 324.70588235294116, top: 670.5882352941177 },
id: 109,
rotation: 0
},
{
type: "object",
width: 1849.4117647058824,
height: 587.6470588235294,
showIframe: true,
adaptation: svgs[3],
configValues: { palette: ["#6148aa", "#e7a044"], angle: 0 },
position: { left: -12.352941176470589, top: 566.4705882352941 },
id: 104,
rotation: 0
},
{
type: "object",
width: 305.29411764705884,
height: 305.29411764705884,
showIframe: true,
adaptation: svgs[1],
configValues: {
palette: [{ r: 187, g: 239, b: 209, a: 0 }, "#e7a044"],
angle: 0
},
position: { left: 760.5882352941177, top: 335.29411764705884 },
id: 110,
rotation: -157
}
]
}
},
// 72
radialGradient,
// 73
{},
// 74
{
...linearGradient,
id: 74,
title: "Round shapes",
author: "Abstract Geometry",
thumb: "/thumbs/74.png?1",
objectPack: "Round Shapes",
textColor: "#fff",
textBackgroundColor: "rgba(61, 0, 129, 0.74)",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#3d0081", "#3d0081"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 431.61634103019543,
height: 431.61634103019543,
showIframe: true,
adaptation: svgs[55],
configValues: { palette: ["#E5CB23", "#3d0081"], angle: 0 },
position: { left: 298.2948490230906, top: -42.202486678507995 },
id: 402,
rotation: 0
},
{
type: "object",
width: 174.56483126110126,
height: 224.44049733570162,
showIframe: true,
adaptation: svgs[56],
configValues: { palette: ["#FF0097", "#3d0081"], angle: 0 },
position: { left: 426.8206039076377, top: -3.8365896980461813 },
id: 404,
rotation: 0
},
{
type: "object",
width: 531.3676731793961,
height: 521.7761989342807,
showIframe: true,
adaptation: svgs[61],
configValues: { palette: ["#3AD5FA", "#3F5CAB"], angle: 0 },
position: { left: 628.2415630550622, top: 343.3747779751332 },
id: 403,
rotation: 0
},
{
type: "object",
width: 326.1101243339254,
height: 180.31971580817054,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#E5CB23", "#3d0081"], angle: 0 },
position: { left: 718.4014209591475, top: 604.2628774422736 },
id: 405,
rotation: 0
},
{
type: "object",
width: 406.6785079928952,
height: 383.65896980461815,
showIframe: true,
adaptation: svgs[59],
configValues: { palette: ["#3AD5FA", "#3F5CAB"], angle: 0 },
position: { left: 304.0497335701599, top: 847.8863232682061 },
id: 407,
rotation: 0
},
{
type: "object",
width: 182.23801065719363,
height: 86.32326820603909,
showIframe: true,
adaptation: svgs[60],
configValues: { palette: ["#FF0097", "#3d0081"], angle: 0 },
position: { left: 407.6376554174068, top: 962.9840142095916 },
id: 408,
rotation: 0
},
{
type: "object",
width: 93.99644760213144,
height: 174.56483126110126,
showIframe: true,
adaptation: svgs[58],
configValues: {
palette: ["#3AD5FA", "#3F5CAB", "#3d0081"],
angle: 0
},
position: { left: 104.54706927175845, top: 151.54529307282417 },
id: 411,
rotation: 0
},
{
type: "object",
width: 218.68561278863234,
height: 42.202486678507995,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#3d0081", "#FF0097"], angle: 0 },
position: { left: -18.22380106571936, top: 452.7175843694494 },
id: 302,
rotation: 0
},
{
type: "object",
width: 174.56483126110126,
height: 42.202486678507995,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#3d0081", "#FF0097"], angle: 0 },
position: { left: 808.5612788632327, top: 516.0213143872114 },
id: 303,
rotation: -180
},
{
type: "object",
width: 172.64653641207818,
height: 36.44760213143872,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#3d0081", "#E5CB23"], angle: 0 },
position: { left: 825.8259325044405, top: 195.66607460035524 },
id: 304,
rotation: -90
},
{
type: "object",
width: 329.9467140319716,
height: 264.72468916518653,
showIframe: true,
adaptation: svgs[57],
configValues: { palette: ["#E5CB23", "#3d0081"], angle: 0 },
position: { left: -29.733570159857905, top: 577.4067495559503 },
id: 406,
rotation: 0
}
]
}
},
// 75
{
...linearGradient,
thumb: "/thumbs/75.png",
textColor: "#fff",
textBackgroundColor: "rgba(114, 33, 181, 0.4)",
defaultLayout: 0,
title: "Round shapes",
author: "Abstract Geometry",
objectPack: "Round Shapes",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#d7b0c3", "#7221b5"],
direction: "custom_angle",
angle: 166
},
insertedItems: [
{
type: "object",
width: 431.61634103019543,
height: 431.61634103019543,
showIframe: true,
adaptation: svgs[55],
configValues: { palette: ["#73d1f9", "#3331e9"], angle: 0 },
position: { left: 290.62166962699825, top: 1.9182948490230907 },
id: 502,
rotation: 0
},
{
type: "object",
width: 544.7957371225577,
height: 521.7761989342807,
showIframe: true,
adaptation: svgs[61],
configValues: { palette: ["#3722e7", "#a97fcb"], angle: 0 },
position: { left: 593.7122557726466, top: 395.1687388987567 },
id: 503,
rotation: 0
},
{
type: "object",
width: 174.56483126110126,
height: 224.44049733570162,
showIframe: true,
adaptation: svgs[56],
configValues: { palette: ["#a97fcb", "#3722e7"], angle: 0 },
position: { left: 839.2539964476022, top: 55.630550621669634 },
id: 504,
rotation: 90
},
{
type: "object",
width: 326.1101243339254,
height: 174.56483126110126,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#b185ca", "#73d1f9"], angle: 0 },
position: { left: 697.3001776198935, top: 650.3019538188278 },
id: 505,
rotation: 0
},
{
type: "object",
width: 329.9467140319716,
height: 264.72468916518653,
showIframe: true,
adaptation: svgs[57],
configValues: { palette: ["#b185ca", "#3331e9"], angle: 0 },
position: { left: -2.877442273534636, top: 579.3250444049734 },
id: 506,
rotation: 0
},
{
type: "object",
width: 420.10657193605687,
height: 383.65896980461815,
showIframe: true,
adaptation: svgs[59],
configValues: { palette: ["#3722e7", "#a97fcb"], angle: 0 },
position: { left: 277.1936056838366, top: 817.1936056838366 },
id: 507,
rotation: 0
},
{
type: "object",
width: 182.23801065719363,
height: 86.32326820603909,
showIframe: true,
adaptation: svgs[60],
configValues: { palette: ["#b185ca", "#73d1f9"], angle: 0 },
position: { left: 407.6376554174068, top: 949.5559502664299 },
id: 508,
rotation: 0
},
{
type: "object",
width: 93.99644760213144,
height: 174.56483126110126,
showIframe: true,
adaptation: svgs[58],
configValues: { palette: ["#b185ca", "#3331e9"], angle: 0 },
position: { left: 104.54706927175845, top: 151.54529307282417 },
id: 511,
rotation: 0
},
{
type: "object",
width: 218.68561278863234,
height: 42.202486678507995,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#73d1f9", { r: 51, g: 49, b: 233, a: 0 }],
angle: 0
},
position: { left: 23.978685612788635, top: 452.7175843694494 },
id: 402,
rotation: 180
},
{
type: "object",
width: 174.56483126110126,
height: 42.202486678507995,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#73d1f9", { r: 114, g: 33, b: 181, a: 0 }],
angle: 0
},
position: { left: 781.7051509769095, top: 554.3872113676732 },
id: 403,
rotation: -180
},
{
type: "object",
width: 172.64653641207818,
height: 36.44760213143872,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#b185ca", "#73d1f9"], angle: 0 },
position: { left: 430.65719360568386, top: 201.42095914742453 },
id: 404,
rotation: -90
}
]
}
},
// 76
{
...linearGradient,
thumb: "/thumbs/76.png",
defaultLayout: 0,
title: "Round shapes",
author: "Abstract Geometry",
objectPack: "Round Shapes",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#10fdd4", "#0077d0"],
direction: "custom_angle",
angle: 94
},
insertedItems: [
{
type: "object",
width: 366.39431616341034,
height: 539.0408525754885,
showIframe: true,
adaptation: svgs[63],
configValues: { palette: ["#540CC2", "#07f3fe"], angle: 0 },
position: { left: 353.92539964476026, top: -239.78685612788635 },
id: 102,
rotation: 0
},
{
type: "object",
width: 366.39431616341034,
height: 539.0408525754885,
showIframe: true,
adaptation: svgs[63],
configValues: { palette: ["#07f3fe", "#540CC2"], angle: 0 },
position: { left: -96.87388987566608, top: 184.1563055062167 },
id: 103,
rotation: -90
},
{
type: "object",
width: 475.7371225577265,
height: 508.348134991119,
showIframe: true,
adaptation: svgs[64],
configValues: { palette: ["#540CC2", "#07f3fe"], angle: 0 },
position: { left: 557.2646536412078, top: 565.8969804618117 },
id: 104,
rotation: -89
},
{
type: "object",
width: 539.0408525754885,
height: 268.5612788632327,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#07f3fe", "#540CC2"], angle: 0 },
position: { left: 775.9502664298402, top: 157.30017761989345 },
id: 105,
rotation: 180
},
{
type: "object",
width: 368.3126110124334,
height: 418.1882770870338,
showIframe: true,
adaptation: svgs[55],
configValues: { palette: ["#07f3fe", "#540CC2"], angle: 0 },
position: { left: 66.18117229129663, top: 734.7069271758437 },
id: 106,
rotation: 180
}
]
}
},
// 77
{
...linearGradient,
thumb: "/thumbs/77.png",
supportedLayout: ["background"],
title: "Round shapes",
author: "Abstract Geometry",
objectPack: "Round Shapes",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#10fdd4", "#0077d0"],
direction: "custom_angle",
angle: 94
},
insertedItems: [
{
type: "object",
width: 713.6056838365897,
height: 709.7690941385436,
showIframe: true,
adaptation: svgs[0],
configValues: { palette: ["#ffffff", "#4facfe"], angle: 0 },
position: { left: 177.4422735346359, top: 157.30017761989345 },
id: 102,
rotation: 0
},
{
type: "object",
width: 366.39431616341034,
height: 539.0408525754885,
showIframe: true,
adaptation: svgs[63],
configValues: { palette: ["#540CC2", "#07f3fe"], angle: 0 },
position: { left: 338.57904085257553, top: -209.0941385435169 },
id: 202,
rotation: 0
},
{
type: "object",
width: 366.39431616341034,
height: 539.0408525754885,
showIframe: true,
adaptation: svgs[63],
configValues: { palette: ["#07f3fe", "#540CC2"], angle: 0 },
position: { left: -96.87388987566608, top: 184.1563055062167 },
id: 203,
rotation: -90
},
{
type: "object",
width: 475.7371225577265,
height: 508.348134991119,
showIframe: true,
adaptation: svgs[64],
configValues: { palette: ["#540CC2", "#07f3fe"], angle: 0 },
position: { left: 553.4280639431616, top: 477.65541740674956 },
id: 204,
rotation: -89
},
{
type: "object",
width: 539.0408525754885,
height: 268.5612788632327,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#07f3fe", "#540CC2"], angle: 0 },
position: { left: 714.5648312611013, top: 166.8916518650089 },
id: 205,
rotation: 180
},
{
type: "object",
width: 333.7833037300178,
height: 414.3516873889876,
showIframe: true,
adaptation: svgs[55],
configValues: { palette: ["#07f3fe", "#540CC2"], angle: 0 },
position: { left: 148.66785079928954, top: 667.5666074600356 },
id: 206,
rotation: 180
}
]
}
},
// 78
{
...linearGradient,
thumb: "/thumbs/78.png",
textColor: "#fff",
textBackgroundColor: "rgba(22, 20, 60, 0.8)",
defaultLayout: 0,
title: "Round shapes",
author: "Abstract Geometry",
objectPack: "Round Shapes",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#16143c", "#16143c"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 312.3529411764706,
height: 165.88235294117646,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#8262ab", "#ae88bb"], angle: 0 },
position: { left: 519.7058823529412, top: -2.6470588235294117 },
id: 202,
rotation: -38
},
{
type: "object",
width: 287.6470588235294,
height: 158.8235294117647,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#8262ab", "#ae88bb"], angle: 0 },
position: { left: 752.6470588235294, top: 892.0588235294118 },
id: 203,
rotation: 43
},
{
type: "object",
width: 310.5882352941177,
height: 141.1764705882353,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#8262ab", "#ae88bb"], angle: 0 },
position: { left: 39.705882352941174, top: 826.7647058823529 },
id: 204,
rotation: 226
},
{
type: "object",
width: 227.64705882352942,
height: 123.52941176470588,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#8262ab", "#ae88bb"], angle: 0 },
position: { left: 293.8235294117647, top: 772.0588235294118 },
id: 205,
rotation: 410
},
{
type: "object",
width: 462.3529411764706,
height: 240,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#8262ab", "#ae88bb"], angle: 0 },
position: { left: -2.6470588235294117, top: 82.05882352941177 },
id: 206,
rotation: 406
},
{
type: "object",
width: 199.41176470588235,
height: 95.29411764705883,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#8262ab", "#ae88bb"], angle: 0 },
position: { left: 535.5882352941177, top: 270.88235294117646 },
id: 207,
rotation: 137
},
{
type: "object",
width: 462.3529411764706,
height: 222.35294117647058,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#8262ab", "#ae88bb"], angle: 0 },
position: { left: 849.7058823529412, top: 426.1764705882353 },
id: 208,
rotation: 495
},
{
type: "object",
width: 352.94117647058823,
height: 155.29411764705884,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#8262ab", "#ae88bb"], angle: 0 },
position: { left: -136.76470588235296, top: 480.88235294117646 },
id: 209,
rotation: 134
},
{
type: "object",
width: 199.41176470588235,
height: 105.88235294117648,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#8262ab", "#ae88bb"], angle: 0 },
position: { left: 397.94117647058823, top: 996.1764705882354 },
id: 210,
rotation: 134
},
{
type: "object",
width: 199.41176470588235,
height: 95.29411764705883,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#8262ab", "#ae88bb"], angle: 0 },
position: { left: 793.2352941176471, top: 221.47058823529412 },
id: 102,
rotation: 403
},
{
type: "object",
width: 130.58823529411765,
height: 63.529411764705884,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#8262ab", "#ae88bb"], angle: 0 },
position: { left: 615, top: 731.4705882352941 },
id: 103,
rotation: 232
}
]
}
},
// 79
{
...linearGradient,
thumb: "/thumbs/79.png",
supportedLayout: ["background"],
title: "Round shapes",
author: "Abstract Geometry",
objectPack: "Round Shapes",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#efd7e7", "#efd7e7"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 524.1176470588235,
height: 540,
showIframe: true,
adaptation: svgs[61],
configValues: {
palette: ["#edbdd7", "#f590bb", "#f7c1bf", "#c8ddd2"],
angle: 0
},
position: { left: 489.7058823529412, top: 347.64705882352945 },
id: 402,
rotation: 0
},
{
type: "object",
width: 252.3529411764706,
height: 247.05882352941177,
showIframe: true,
adaptation: svgs[59],
configValues: { palette: ["#89b4eb", "#edbdd7"], angle: 0 },
position: { left: 108.52941176470588, top: 435.88235294117646 },
id: 302,
rotation: 180
},
{
type: "object",
width: 270,
height: 268.2352941176471,
showIframe: true,
adaptation: svgs[59],
configValues: { palette: ["#f7c1bf", "#edbdd7"], angle: 0 },
position: { left: 622.0588235294118, top: 494.11764705882354 },
id: 105,
rotation: 0
},
{
type: "object",
width: 252.3529411764706,
height: 247.05882352941177,
showIframe: true,
adaptation: svgs[59],
configValues: { palette: ["#c8ddd2", "#f7c1bf"], angle: 0 },
position: { left: 300.88235294117646, top: 785.2941176470589 },
id: 106,
rotation: 0
},
{
type: "object",
width: 270,
height: 540,
showIframe: true,
adaptation: svgs[58],
configValues: {
palette: ["#89b4eb", "#edbdd7", "#edbdd7"],
angle: 0
},
position: { left: -90.88235294117648, top: 690 },
id: 107,
rotation: 0
},
{
type: "object",
width: 540,
height: 540,
showIframe: true,
adaptation: svgs[0],
configValues: { palette: ["#f7c1bf", "#edbdd7"], angle: 0 },
position: { left: 106.76470588235294, top: -220.58823529411765 },
id: 108,
rotation: 0
},
{
type: "object",
width: 540,
height: 268.2352941176471,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#89b4eb", "#edbdd7"], angle: 0 },
position: { left: 685.5882352941177, top: -63.529411764705884 },
id: 109,
rotation: 64
}
]
}
},
// 80
{
...linearGradient,
thumb: "/thumbs/80.png",
textColor: "#fff",
defaultLayout: 0,
title: "Round shapes",
author: "Abstract Geometry",
objectPack: "Round Shapes",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["black", "black"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 245.29411764705884,
height: 345.88235294117646,
showIframe: true,
adaptation: svgs[63],
configValues: { palette: ["#ff1c1c", "#1633cc"], angle: 0 },
position: { left: -55.588235294117645, top: 252.3529411764706 },
id: 202,
rotation: -90
},
{
type: "object",
width: 319.4117647058824,
height: 330,
showIframe: true,
adaptation: svgs[61],
configValues: { palette: ["#ff1c1c", "#1633cc"], angle: 0 },
position: { left: 53.82352941176471, top: 665.2941176470589 },
id: 203,
rotation: 0
},
{
type: "object",
width: 245.29411764705884,
height: 345.88235294117646,
showIframe: true,
adaptation: svgs[63],
configValues: { palette: ["#1633cc", "#ff1c1c"], angle: 0 },
position: { left: 424.4117647058824, top: -52.94117647058824 },
id: 204,
rotation: 0
},
{
type: "object",
width: 315.88235294117646,
height: 317.6470588235294,
showIframe: true,
adaptation: svgs[64],
configValues: { palette: ["#ff1c1c", "#1633cc"], angle: 0 },
position: { left: 685.5882352941177, top: 679.4117647058823 },
id: 205,
rotation: -90
},
{
type: "object",
width: 128.8235294117647,
height: 31.764705882352942,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#1633cc", "#ff1c1c"], angle: 0 },
position: { left: 470.29411764705884, top: 1032.3529411764707 },
id: 208,
rotation: -90
},
{
type: "object",
width: 125.29411764705883,
height: 28.235294117647058,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#1633cc", "#ff1c1c"], angle: 0 },
position: { left: 62.64705882352941, top: 970.5882352941177 },
id: 209,
rotation: 180
},
{
type: "object",
width: 250.58823529411765,
height: 31.764705882352942,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#1633cc", "#ff1c1c"], angle: 0 },
position: { left: 992.6470588235294, top: 554.1176470588235 },
id: 210,
rotation: 0
},
{
type: "object",
width: 128.8235294117647,
height: 31.764705882352942,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#1633cc", "#ff1c1c"], angle: 0 },
position: { left: 105, top: 1.7647058823529411 },
id: 211,
rotation: -91
},
{
type: "object",
width: 300,
height: 142.94117647058823,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#ff1c1c", "#1633cc"], angle: 0 },
position: { left: 802.0588235294118, top: 176.47058823529412 },
id: 206,
rotation: 180
},
{
type: "object",
width: 128.8235294117647,
height: 31.764705882352942,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#1633cc", "#ff1c1c"], angle: 0 },
position: { left: 802.0588235294118, top: 416.47058823529414 },
id: 207,
rotation: 0
}
]
}
},
// 81
{
...linearGradient,
thumb: "/thumbs/81.png",
textColor: "#fff",
title: "Round shapes",
author: "Abstract Geometry",
objectPack: "Round Shapes",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#081f3c", "#527794"],
direction: "custom_angle",
angle: 90
},
insertedItems: [
{
type: "object",
width: 287.6470588235294,
height: 296.47058823529414,
showIframe: true,
adaptation: svgs[61],
configValues: { palette: ["#527794", "#081f3c"], angle: 0 },
position: { left: 99.70588235294117, top: 81.17647058823529 },
id: 202,
rotation: 90
},
{
type: "object",
width: 259.4117647058824,
height: 328.2352941176471,
showIframe: true,
adaptation: svgs[63],
configValues: { palette: ["#081f3c", "#527794"], angle: 0 },
position: { left: 473.8235294117647, top: -37.05882352941177 },
id: 203,
rotation: 0
},
{
type: "object",
width: 264.70588235294116,
height: 375.88235294117646,
showIframe: true,
adaptation: svgs[63],
configValues: { palette: ["#081f3c", "#527794"], angle: 0 },
position: { left: 295.5882352941177, top: 760.5882352941177 },
id: 204,
rotation: 180
},
{
type: "object",
width: 287.6470588235294,
height: 296.47058823529414,
showIframe: true,
adaptation: svgs[61],
configValues: { palette: ["#527794", "#081f3c"], angle: 0 },
position: { left: 759.7058823529412, top: 600 },
id: 205,
rotation: 360
},
{
type: "object",
width: 277.05882352941177,
height: 391.7647058823529,
showIframe: true,
adaptation: svgs[63],
configValues: { palette: ["#527794", "#527794"], angle: 0 },
position: { left: -131.47058823529412, top: 566.4705882352941 },
id: 209,
rotation: 269
},
{
type: "object",
width: 210,
height: 26.47058823529412,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#081f3c", "#527794"], angle: 0 },
position: { left: 669.7058823529412, top: 870 },
id: 210,
rotation: 0
},
{
type: "object",
width: 210,
height: 26.47058823529412,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#081f3c", "#527794"], angle: 0 },
position: { left: 0.8823529411764706, top: 86.47058823529412 },
id: 211,
rotation: 90
},
{
type: "object",
width: 210,
height: 26.47058823529412,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#081f3c", "#527794"], angle: 0 },
position: { left: 810.8823529411765, top: 275.29411764705884 },
id: 212,
rotation: 0
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Roboto",
fontSize: 57,
padding: 44,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 1,
isInline: false,
lineHeight: 17,
hasCyrillic: true
},
id: 102,
width: 612.7941176470588,
height: 375.8272058823529,
position: { left: 252.3529411764706, top: 375.88235294117646 },
text: "Серебряный туман \nзатопил палубу \nкорабля"
}
]
}
},
// 82
{
...linearGradient,
thumb: "/thumbs/82.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ffffff", "#ecfffe"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 1032.0426287744228,
height: 491.0834813499112,
showIframe: true,
adaptation: svgs[52],
configValues: {
palette: ["#9cfff1", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: -155.38188277087036, top: 314.6003552397869 },
id: 203,
rotation: 88
},
{
type: "object",
width: 548.6323268206039,
height: 375.98579040852576,
showIframe: true,
adaptation: svgs[52],
configValues: {
palette: ["#9ce5ff", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 399.0053285968029, top: -34.52930728241563 },
id: 205,
rotation: 229
},
{
type: "object",
width: 427.77975133214926,
height: 441.20781527531085,
showIframe: true,
adaptation: svgs[52],
configValues: {
palette: ["#7aa3fe", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 249.3783303730018, top: 109.34280639431617 },
id: 202,
rotation: 446
},
{
type: "object",
width: 510.2664298401421,
height: 395.1687388987567,
showIframe: true,
adaptation: svgs[52],
configValues: {
palette: ["#27e1e1", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 153.46358792184725, top: 132.36234458259327 },
id: 204,
rotation: 173
},
{
type: "object",
width: 170.72824156305506,
height: 93.99644760213144,
showIframe: true,
adaptation: svgs[52],
configValues: {
palette: ["#33d3d3", { r: 51, g: 211, b: 211, a: 0 }],
angle: 0
},
position: { left: 874.7424511545294, top: 705.9325044404974 },
id: 208,
rotation: 301
},
{
type: "object",
width: 178.40142095914743,
height: 65.22202486678509,
showIframe: true,
adaptation: svgs[52],
configValues: {
palette: [
{ r: 122, g: 163, b: 254, a: 0.76 },
{ r: 122, g: 163, b: 254, a: 0 }
],
angle: 0
},
position: { left: 801.8472468916519, top: 721.2788632326822 },
id: 207,
rotation: 635
},
{
type: "object",
width: 92.07815275310836,
height: 21.101243339253998,
showIframe: true,
adaptation: svgs[52],
configValues: { palette: ["#9cfff1", "#9cfff1"], angle: 0 },
position: { left: 63.30373001776199, top: 132.36234458259327 },
id: 209,
rotation: 63
},
{
type: "object",
width: 92.07815275310836,
height: 21.101243339253998,
showIframe: true,
adaptation: svgs[52],
configValues: { palette: ["#9ce5ff", "#9cfff1"], angle: 0 },
position: { left: 913.1083481349912, top: 117.01598579040854 },
id: 210,
rotation: 111
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Prata",
fontSize: 76,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true,
isBold: false
},
id: 102,
width: 960.4962255772647,
height: 290.4418294849023,
position: { left: 66.18117229129663, top: 695.3818827708703 },
text: "Едва осознав, \nчто происходит, \nмы оторвались от земли"
},
{
type: "object",
width: 46.03907637655418,
height: 21.101243339253998,
showIframe: true,
adaptation: svgs[52],
configValues: {
palette: [
{ r: 156, g: 229, b: 255, a: 0.56 },
{ r: 156, g: 229, b: 255, a: 0 }
],
angle: 0
},
position: { left: 671.4031971580818, top: 494.92007104795744 },
id: 103,
rotation: 102
}
]
}
},
// 83
{
...linearGradient,
thumb: "/thumbs/83.png",
textColor: "#fff",
title: "Glitchy elements",
author: "Anna Taran",
objectPack: "Glitchy",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#371b41", "#722345"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 539.0408525754885,
height: 364.47602131438725,
showIframe: true,
adaptation: svgs[73],
configValues: { palette: ["#722345", "#FF2200"], angle: 0 },
position: { left: -5.754884547069272, top: 732.7886323268207 },
id: 202,
rotation: 0
},
{
type: "object",
width: 228.2770870337478,
height: 464.227353463588,
showIframe: true,
adaptation: svgs[68],
configValues: { palette: ["#be1024", "#be1024"], angle: 0 },
position: { left: 209.0941385435169, top: 627.2824156305506 },
id: 203,
rotation: 0
},
{
type: "object",
width: 399.0053285968029,
height: 366.39431616341034,
showIframe: true,
adaptation: svgs[76],
configValues: { palette: ["#FF2200", "#722345"], angle: 0 },
position: { left: -9.591474245115453, top: -24.93783303730018 },
id: 204,
rotation: 0
},
{
type: "object",
width: 199.50266429840144,
height: 408.5968028419183,
showIframe: true,
adaptation: svgs[71],
configValues: {
palette: [{ r: 65, g: 32, b: 59, a: 0 }, "#be1024"],
angle: 0
},
position: { left: 527.5310834813499, top: 679.0763765541741 },
id: 205,
rotation: 0
},
{
type: "object",
width: 249.3783303730018,
height: 354.8845470692718,
showIframe: true,
adaptation: svgs[77],
configValues: {
palette: [{ r: "122", g: "28", b: "67", a: "0" }, "#FF2200"],
angle: 0
},
position: { left: 372.1492007104796, top: 151.54529307282417 },
id: 207,
rotation: 180
},
{
type: "object",
width: 539.0408525754885,
height: 358.72113676731794,
showIframe: true,
adaptation: svgs[74],
configValues: {
palette: [{ r: 122, g: 28, b: 67, a: 0 }, "#FF2200"],
angle: 0
},
position: { left: 544.7957371225577, top: -9.591474245115453 },
id: 206,
rotation: 180
},
{
type: "object",
width: 239.78685612788635,
height: 539.0408525754885,
showIframe: true,
adaptation: svgs[78],
configValues: {
palette: ["#FF2200", { r: 122, g: 28, b: 67, a: 0 }],
angle: 0
},
position: { left: 220.60390763765542, top: -3.8365896980461813 },
id: 208,
rotation: 0
},
{
type: "object",
width: 381.74067495559507,
height: 395.1687388987567,
showIframe: true,
adaptation: svgs[79],
configValues: { palette: ["#722345", "#FF2200"], angle: 0 },
position: { left: 725.1154529307283, top: 732.7886323268207 },
id: 210,
rotation: 0
}
]
}
},
// 84
{
...blank,
thumb: "/thumbs/84.png",
title: "subtle waves",
textColor: "#000",
defaultLayout: 0,
id: 84,
initState: {
size: { width: 1080, height: 1080 },
configValues: { transparent: false, color: "#ffffff" },
insertedItems: [
{
type: "object",
width: 999.4316163410302,
height: 999.4316163410302,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#efefef", "#f5cea1"],
direction: "custom_angle",
angle: 200
},
position: { left: 37.40674955595027, top: 40.284191829484904 },
id: 202,
rotation: 0
},
{
type: "object",
width: 994.7855917667238,
height: 424.21955403087475,
showIframe: true,
adaptation: svgs[84],
configValues: {
palette: [{ r: 245, g: 206, b: 161, a: 0.02 }, "#eb8997"],
angle: 0
},
position: { left: 40.75471698113207, top: 466.8267581475128 },
id: 304,
rotation: 0
},
{
type: "object",
width: 998.4905660377358,
height: 507.5814751286449,
showIframe: true,
adaptation: svgs[88],
configValues: { palette: ["#f5cea1", "#eb8997"], angle: 0 },
position: { left: 37.049742710120064, top: 529.8113207547169 },
id: 303,
rotation: 0
},
{
type: "object",
width: 383.4648370497427,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 175.98627787307032, top: 281.5780445969125 },
id: 402,
rotation: -48
},
{
type: "object",
width: 242.67581475128642,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#fdfdfd", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 809.5368782161235, top: 150.05145797598627 },
id: 403,
rotation: -48
},
{
type: "object",
width: 166.7238421955403,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 474.23670668953685, top: 188.95368782161233 },
id: 404,
rotation: -48
}
]
}
},
// 85
{
...linearGradient,
thumb: "/thumbs/85.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ed2639", "#fb8714"],
direction: "right",
angle: 200
},
insertedItems: [
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oswald",
fontSize: 120,
padding: 130,
letterSpacing: 0,
color: "#fdfdfd",
backgroundColor: "#000000",
borderWidth: 0,
isInline: false,
lineHeight: 10,
textAlign: "center",
isBold: true
},
id: 202,
width: 675.8992007104796,
height: 616.7917406749557,
position: { left: 198.5435168738899, top: 254.1740674955595 },
text: "THE\nATLANTIC\nFESTIVAL"
},
{
type: "object",
width: 399.0053285968029,
height: 558.2238010657194,
showIframe: true,
adaptation: svgs[63],
configValues: {
palette: ["#ffffff", { r: 255, g: 255, b: 255, a: 0.16 }],
angle: 0
},
position: { left: 696.3410301953819, top: -397.0870337477798 },
id: 102,
rotation: 33
},
{
type: "object",
width: 539.0408525754885,
height: 462.3090586145649,
showIframe: true,
adaptation: svgs[57],
configValues: {
palette: [{ r: 253, g: 253, b: 253, a: 0.13 }, "#ffffff"],
angle: 0
},
position: { left: -310.7637655417407, top: -187.99289520426288 },
id: 103,
rotation: 123
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Roboto",
fontSize: 36,
padding: 10,
letterSpacing: 4,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
isBold: true
},
id: 104,
width: 509.51709591474247,
height: 62.16474245115453,
position: { left: 286.7850799289521, top: 927.4955595026644 },
text: "SEPTEMBER 24-26, 2019"
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Roboto",
fontSize: 27,
padding: 10,
letterSpacing: 4,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
isBold: true
},
id: 105,
width: 340.01776198934283,
height: 50.65497335701599,
position: { left: 367.35346358792185, top: 146.74955595026645 },
text: "#THEATLANTICFEST"
}
]
}
},
// 86
{
...linearGradient,
thumb: "/thumbs/86.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#fbe0b0", "#feb15a"],
direction: "right",
angle: 200
},
insertedItems: [
{
type: "object",
width: 251.2966252220249,
height: 443.12611012433393,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#feb15a", "#fbe0b0"],
direction: "custom_angle",
angle: 200
},
position: { left: 149.62699822380108, top: 730.8703374777975 },
id: 104,
rotation: 90
},
{
type: "object",
width: 270.4795737122558,
height: 435.4529307282416,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#feb15a", "#fbe0b0"],
direction: "custom_angle",
angle: 200
},
position: { left: 489.1651865008881, top: 642.6287744227354 },
id: 103,
rotation: 180
},
{
type: "object",
width: 270.4795737122558,
height: 717.4422735346359,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#feb15a", "#fbe0b0"],
direction: "custom_angle",
angle: 200
},
position: { left: 750.0532859680285, top: 358.72113676731794 },
id: 102,
rotation: 180
},
{
type: "object",
width: 222.52220248667854,
height: 218.68561278863234,
showIframe: true,
adaptation: svgs[52],
configValues: { palette: ["#feb15a", "#fbe0b0"], angle: 0 },
position: { left: 191.82948490230908, top: 608.0994671403198 },
id: 105,
rotation: -90
}
]
}
},
// 87
{
...linearGradient,
thumb: "/thumbs/87.png",
title: "blurred bubbles",
author: "anonymous",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#fceff6", "#ebf1ff"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 1118,
height: 256,
showIframe: true,
adaptation: svgs[81],
configValues: {
palette: [{ r: 64, g: 134, b: 224, a: 0 }, "#54b9db"],
angle: 0
},
position: { left: -7, top: -12.5 },
id: 402,
rotation: 180
},
{
type: "object",
width: 1089,
height: 268,
showIframe: true,
adaptation: svgs[89],
configValues: {
palette: [{ r: 198, g: 223, b: 255, a: 0.13 }, "#54b9db"],
angle: 0
},
position: { left: -91, top: -166.5 },
id: 403,
rotation: 156
},
{
type: "object",
width: 1207,
height: 256,
showIframe: true,
adaptation: svgs[86],
configValues: {
palette: ["#7d91eb", { r: 84, g: 185, b: 219, a: 0 }],
angle: 0
},
position: { left: -70, top: -130.5 },
id: 404,
rotation: 180
},
{
type: "object",
width: 386,
height: 301,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#EABDD9", "#B0C5F8"], angle: 0 },
position: { left: 890, top: 200.5 },
id: 406,
rotation: 0
},
{
type: "object",
width: 1207,
height: 256,
showIframe: true,
adaptation: svgs[86],
configValues: {
palette: [
{ r: 125, g: 145, b: 235, a: 0.37 },
{ r: 84, g: 185, b: 219, a: 0 }
],
angle: 0
},
position: { left: 81, top: -246.5 },
id: 407,
rotation: 216
},
{
type: "object",
width: 175,
height: 164,
showIframe: true,
adaptation: svgs[139],
configValues: {
palette: ["#5cf4be", { r: 197, g: 253, b: 201, a: 0.29 }],
angle: 0
},
position: { left: 640, top: -57.5 },
id: 405,
rotation: 0
},
{
type: "object",
width: 1076,
height: 505,
showIframe: true,
adaptation: svgs[89],
configValues: {
palette: [
{ r: 176, g: 197, b: 248, a: 0 },
{ r: 234, g: 189, b: 217, a: 0.56 }
],
angle: 0
},
position: { left: 400, top: 614.5 },
id: 408,
rotation: -31
},
{
type: "object",
width: 161,
height: 156,
showIframe: true,
adaptation: svgs[52],
configValues: {
palette: [
{ r: 255, g: 143, b: 221, a: 0.54 },
{ r: 237, g: 234, b: 156, a: 0.24 }
],
angle: 0
},
position: { left: 55, top: 139.5 },
id: 413,
rotation: 0
},
{
type: "object",
width: 99,
height: 94,
showIframe: true,
adaptation: svgs[52],
configValues: {
palette: [
{ r: 255, g: 255, b: 255, a: 0.34 },
{ r: 255, g: 255, b: 255, a: 0.13 }
],
angle: 0
},
position: { left: 413, top: 146.5 },
id: 414,
rotation: 0
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Nunito",
fontSize: 82,
padding: 10,
letterSpacing: 0,
color: "#000000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 11,
isBold: true
},
id: 305,
width: 809.34375,
height: 200,
position: { left: 82, top: 404 },
text: "super calming\nrelaxing sleep sounds"
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "ABeeZee",
fontSize: 44,
padding: 10,
letterSpacing: 0,
color: "#000000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 16
},
id: 306,
width: 569.65625,
height: 90,
position: { left: 83, top: 631 },
text: "feel your stress melt away"
},
{
type: "object",
width: 381,
height: 64,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#edf746", "#eeac77"],
direction: "custom_angle",
angle: 200
},
position: { left: 91, top: 807.5 },
id: 104,
rotation: 0
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "ABeeZee",
fontSize: 32,
padding: 10,
letterSpacing: 0,
color: "#000000",
backgroundColor: { r: 238, g: 172, b: 119, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 16,
hasCyrillic: true
},
id: 102,
width: 276.609375,
height: 71,
position: { left: 153, top: 804 },
text: " 2,435 .wav files "
}
]
}
},
// 88
{
...linearGradient,
thumb: "/thumbs/88.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#1d1d63", "#08061c"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 645,
height: 595,
showIframe: true,
adaptation: svgs[134],
configValues: { palette: ["#1fa3f7", "#14d2b3"], angle: 0 },
position: { left: 224, top: 220.5 },
id: 102,
rotation: 0
},
{
type: "object",
width: 688,
height: 536,
showIframe: true,
adaptation: svgs[136],
configValues: { palette: ["#3a43fc", "#f109aa"], angle: 0 },
position: { left: 255, top: 252.5 },
id: 103,
rotation: 0
},
{
type: "object",
width: 264,
height: 13,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#1d1c62", "#692dc4"],
direction: "custom_angle",
angle: 200
},
position: { left: 242, top: 677.5 },
id: 104,
rotation: 0
},
{
type: "object",
width: 261,
height: 12,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#1d1c62", "#692dc4"],
direction: "custom_angle",
angle: 200
},
position: { left: 164, top: 455.5 },
id: 105,
rotation: 0
},
{
type: "object",
width: 261,
height: 15,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#0bff8f", "#2f6ab9"],
direction: "custom_angle",
angle: 200
},
position: { left: 616, top: 753.5 },
id: 106,
rotation: 0
},
{
type: "object",
width: 261,
height: 13,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#0bff8f", "#2f6ab9"],
direction: "custom_angle",
angle: 200
},
position: { left: 713, top: 506.5 },
id: 107,
rotation: 0
},
{
type: "object",
width: 264,
height: 13,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#1d1c62", "#692dc4"],
direction: "custom_angle",
angle: 200
},
position: { left: 217, top: 381.5 },
id: 108,
rotation: 0
},
{
type: "object",
width: 210,
height: 199,
showIframe: true,
adaptation: svgs[0],
configValues: { palette: ["#ffffff", "#ffffff"], angle: 0 },
position: { left: 734, top: 830.5 },
id: 110,
rotation: 0
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Roboto",
fontSize: 37,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
textAlign: "center"
},
id: 111,
width: 76.90625,
height: 108,
position: { left: 800, top: 877 },
text: "26\nOct"
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Lalezar",
fontSize: 100,
padding: 10,
letterSpacing: 17,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
textAlign: "left",
isBold: true
},
id: 112,
width: 543,
height: 380,
position: { left: 368, top: 344 },
text: "DNB & \nBEATS\nFESTIVAL"
}
]
}
},
// 89
{
...radialGradient,
thumb: "/thumbs/89.png",
initState: {
size: { width: 1200, height: 550 },
configValues: { palette: ["#820701", "#120807"] },
insertedItems: [
{
type: "object",
width: 1225,
height: 551,
showIframe: true,
adaptation: gradientWaves,
configValues: {
palette: ["#3c0301", "#080000"],
lines: 54,
amplituteX: 563,
amplituteY: 10,
smoothness: 34,
fill: false,
randomValues: []
},
position: { left: -7, top: 0.5 },
id: 202,
rotation: 0
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Inconsolata",
fontSize: 39,
padding: 10,
letterSpacing: 0,
color: "#f1c031",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
isBold: true
},
id: 203,
width: 293,
height: 66,
position: { left: 449, top: 109 },
text: "npm Enterprise"
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Inconsolata",
fontSize: 24,
padding: 10,
letterSpacing: 0,
color: "#f1c031",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
textAlign: "center"
},
id: 204,
width: 1112,
height: 104,
position: { left: 43, top: 212 },
text:
"You need to get quality products to market fast but you also need enterprise-grade security\nand compliance. Speed up development while also upgrading to the most advanced tooling in \nJavaScript, from the trusted authorities on JavaScript package management."
},
{
type: "object",
width: 324,
height: 61,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#6c3212", "#6c3212"],
direction: "custom_angle",
angle: 200
},
position: { left: 453, top: 391.5 },
id: 206,
rotation: 0
},
{
type: "object",
width: 324,
height: 61,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#f1c031", "#f1c031"],
direction: "custom_angle",
angle: 200
},
position: { left: 442, top: 381.5 },
id: 205,
rotation: 0
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Inconsolata",
fontSize: 22,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
isBold: true
},
id: 207,
width: 154.203125,
height: 46,
position: { left: 531, top: 389 },
text: "Learn more →"
}
]
}
},
// 90
{
...waterpipe,
defaultLayout: 4,
textColor: "#000",
textBackgroundColor: "rgba(255, 255, 255, 0.3)",
id: 90,
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#6d107e", "#f03358"],
opacity: 10,
smokeSize: 155,
lineWidth: 25,
numCircles: 1
},
insertedItems: []
}
},
// 91
{
...linearGradient,
thumb: "/thumbs/91.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#231a2e", "#120e1d"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 789,
height: 716,
showIframe: true,
adaptation: svgs[131],
configValues: {
palette: [
{ r: 255, g: 255, b: 255, a: 0.11 },
{ r: 18, g: 14, b: 29, a: 0 }
],
angle: 0
},
position: { left: 167, top: 176.5 },
id: 105,
rotation: 0
},
{
type: "object",
width: 756,
height: 475,
showIframe: true,
adaptation: svgs[132],
configValues: { palette: ["#fe5f26", "#fe2522"], angle: 0 },
position: { left: 169, top: 286.5 },
id: 103,
rotation: 0
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Alfa Slab One",
fontSize: 59,
padding: 10,
letterSpacing: 0,
color: "#007bff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12
},
id: 106,
width: 577.671875,
height: 90,
position: { left: 239, top: 900 },
text: "Some sample text"
}
]
}
},
// 92
{
...linearGradient,
thumb: "/thumbs/92.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ffffff", "#ffffff"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 32,
height: 251,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#46003a", "#ea01b7"], angle: 0 },
position: { left: 564, top: 338.5 },
id: 102,
rotation: -43
},
{
type: "object",
width: 163,
height: 371,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#5098a1", "#a43aa6"], angle: 0 },
position: { left: 615, top: 111.5 },
id: 103,
rotation: 53
},
{
type: "object",
width: 187,
height: 153,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#c62cec", "#a1ceaa"], angle: 0 },
position: { left: 503, top: 518.5 },
id: 104,
rotation: 130
},
{
type: "object",
width: 76,
height: 55,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#c62cec", "#a1ceaa"], angle: 0 },
position: { left: 843, top: 135.5 },
id: 105,
rotation: 5
},
{
type: "object",
width: 73,
height: 153,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#c62cec", "#a1ceaa"], angle: 0 },
position: { left: 633, top: 391.5 },
id: 106,
rotation: 265
},
{
type: "object",
width: 85,
height: 229,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#1dcfaa", "#a41511"], angle: 0 },
position: { left: 187, top: 527.5 },
id: 107,
rotation: 93
},
{
type: "object",
width: 85,
height: 150,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#1dcfaa", "#a41511"], angle: 0 },
position: { left: 123, top: 670.5 },
id: 108,
rotation: 172
},
{
type: "object",
width: 25,
height: 296,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#37d3b0", "#c8b9f5"], angle: 0 },
position: { left: 546, top: 706.5 },
id: 110,
rotation: 0
},
{
type: "object",
width: 25,
height: 296,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#37d3b0", "#c8b9f5"], angle: 0 },
position: { left: 610, top: 724.5 },
id: 111,
rotation: 24
},
{
type: "object",
width: 25,
height: 296,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#37d3b0", "#c8b9f5"], angle: 0 },
position: { left: 681, top: 863.5 },
id: 112,
rotation: 91
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Prompt",
fontSize: 75,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0.5 },
borderWidth: 0,
isInline: false,
lineHeight: 12
},
id: 113,
width: 614.5625,
height: 200,
position: { left: 297, top: 427 },
text: "▽ Not sponsored \nby triangles ►"
},
{
type: "object",
width: 25,
height: 296,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#37d3b0", "#c8b9f5"], angle: 0 },
position: { left: 546, top: 706.5 },
id: 114,
rotation: 0
},
{
type: "object",
width: 25,
height: 296,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#37d3b0", "#c8b9f5"], angle: 0 },
position: { left: 546, top: 706.5 },
id: 115,
rotation: 0
}
]
}
},
// 93
{},
// 94
{
...linearGradient,
thumb: "/thumbs/94.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#fceff6", "#ebf1ff"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 348,
height: 307,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#EABDD9", "#B0C5F8"], angle: 0 },
position: { left: 6, top: 89.5 },
id: 108,
rotation: 0
},
{
type: "object",
width: 75,
height: 73,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#4BBFD6", "#8456D7"], angle: 0 },
position: { left: 7, top: 284.5 },
id: 105,
rotation: 0
},
{
type: "object",
width: 62,
height: 62,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#fffa34", "#539200"], angle: 0 },
position: { left: 322, top: 472.5 },
id: 106,
rotation: 0
},
{
type: "object",
width: 196,
height: 191,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 835, top: 157.5 },
id: 107,
rotation: 0
}
]
}
},
// 95
{
...linearGradient,
thumb: "/thumbs/95.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#fbfbfb", "#ebf1ff"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 264.72468916518653,
height: 354.8845470692718,
showIframe: true,
adaptation: svgs[107],
configValues: { palette: ["#f9f1d7", "#a7f1e2"], angle: 0 },
position: { left: 397.0870337477798, top: 201.42095914742453 },
id: 102,
rotation: 59
},
{
type: "object",
width: 414.3516873889876,
height: 351.0479573712256,
showIframe: true,
adaptation: svgs[102],
configValues: { palette: ["#f4b0b2", "#fae9ca"], angle: 0 },
position: { left: 1.9182948490230907, top: 234.03197158081707 },
id: 103,
rotation: -4
},
{
type: "object",
width: 565.8969804618117,
height: 207.1758436944938,
showIframe: true,
adaptation: svgs[100],
configValues: { palette: ["#bbc5e3", "#58ebe4"], angle: 113 },
position: { left: 506.42984014209594, top: 124.6891651865009 },
id: 104,
rotation: 4
},
{
type: "object",
width: 13.428063943161636,
height: 466.14564831261106,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#000000", "#000000"], angle: 0 },
position: { left: 237.86856127886324, top: 460.39076376554175 },
id: 105,
rotation: 0
},
{
type: "object",
width: 13.428063943161636,
height: 466.14564831261106,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#000000", "#000000"], angle: 0 },
position: { left: 510.2664298401421, top: 397.0870337477798 },
id: 106,
rotation: 3
},
{
type: "object",
width: 13.428063943161636,
height: 466.14564831261106,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#000000", "#000000"], angle: 0 },
position: { left: 794.1740674955596, top: 226.3587921847247 },
id: 107,
rotation: 0
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Warnes",
fontSize: 46.03907637655418,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12
},
id: 108,
width: 391.6618561278863,
height: 73.67451154529307,
position: { left: 610.9769094138544, top: 795.133214920071 },
text: "autumn trees"
}
]
}
},
// 96
{
...radialGradient,
author: "Freepik",
authorLink: "https://freepik.com",
title: "Radial gradient with ripples",
thumb: "/thumbs/96.png",
palettes: [
["#5B2A86", "#360568", "#E5C3D1", "#613F75"],
["#f3a930", "#e76779", "#c9eaff", "#e9e9f1"],
["#7e2ec4", "#360568", "#00fffc", "#54fd8b"],
["#9AD1D4", "#CCDBDC", "#007EA7", "#003249"],
["#ffcdd3", "#dfb7c7", "#fbf7ff", "#6961ff"],
["#16143c", "#1a1844", "#e96eff", "#6f00fb"]
],
initState: {
size: { width: 726, height: 563 },
configValues: { palette: ["#3f0686", "#260057"] },
insertedItems: [
{
type: "object",
width: 727,
height: 565,
showIframe: true,
adaptation: svgs[54],
configValues: { palette: ["#fdf5d4", "#ff3ba6"], angle: 0 },
position: { left: 0, top: -0.5 },
id: 102,
rotation: 0
}
]
}
},
// 97
{
...linearGradient,
thumb: "/thumbs/97.png",
initState: {
size: { width: 1280, height: 962 },
configValues: {
palette: ["#fceff6", "#ebf1ff"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 346.5981148243359,
height: 304.9185946872322,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#EABDD9", "#B0C5F8"], angle: 0 },
position: { left: 802.879177377892, top: 81.74807197943444 },
id: 508,
rotation: 0
},
{
type: "object",
width: 52.64781491002571,
height: 51.550985432733505,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#4BBFD6", "#8456D7"], angle: 0 },
position: { left: 814.9443016281062, top: 122.33076263924593 },
id: 505,
rotation: 0
},
{
type: "object",
width: 194.13881748071978,
height: 189.751499571551,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 23.033419023136247, top: 738.7489288774635 },
id: 507,
rotation: 0
},
{
type: "object",
width: 823.7189374464439,
height: 686.6152527849185,
showIframe: true,
adaptation: svgs[140],
configValues: {
palette: ["#ffffff", { r: 255, g: 255, b: 255, a: 0.7 }],
angle: 0
},
position: { left: -250.0771208226221, top: -258.26906598114823 },
id: 303,
rotation: 0
},
{
type: "object",
width: 60.32562125107112,
height: 60.32562125107112,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#fffa34", "#539200"], angle: 0 },
position: { left: 409.1173950299914, top: 213.36760925449872 },
id: 506,
rotation: 0
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Poppins",
fontSize: 56,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 14,
isBold: true
},
id: 403,
position: { left: 140.942587832048, top: 323.77035132819196 },
width: 1085.929734361611,
height: 175.73264781491002,
text: "a simple design tool \nbased on packs of adaptive elements\n"
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Poppins",
fontSize: 39,
padding: 10,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 16,
isBold: false
},
id: 404,
position: { left: 139.8457583547558, top: 529.9742930591259 },
width: 797.617823479006,
height: 142.82776349614394,
text:
"for music makers, for coders, for writers, \nand other creatives"
},
{
type: "object",
width: 584.6101113967437,
height: 495.7669237360754,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffffff", "#cbd8f9"], angle: 0 },
position: { left: 871.9794344473007, top: 586.2896315338475 },
id: 102,
rotation: 0
},
{
type: "object",
width: 282.9820051413882,
height: 251.1739502999143,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffffff", "#cbd8f9"], angle: 0 },
position: { left: 691.0025706940874, top: 648.808911739503 },
id: 302,
rotation: 0
}
]
}
},
// 98
{
...radialGradient,
thumb: "/thumbs/98.png",
textColor: "#fff",
textBackgroundColor: "rgba(255, 0, 0, 0.14)",
defaultLayout: 0,
initState: {
size: { width: 1000, height: 1000 },
configValues: { palette: ["#440000", "#1f0000"] },
insertedItems: [
{
type: "object",
width: 1021.2418300653595,
height: 743.4640522875817,
showIframe: true,
adaptation: waterpipe,
configValues: {
palette: ["#400000", "#ff0000"],
opacity: 10,
smokeSize: 113,
lineWidth: 20,
numCircles: 1
},
position: { left: 0, top: 130.718954248366 },
id: 102,
rotation: 0
}
]
}
},
// 99
{
...waterpipe,
thumb: "/thumbs/99.png",
defaultLayout: 4,
textColor: "#000",
textBackgroundColor: "rgba(255, 255, 255, 0.8)",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#000000", "#6d6d6d"],
opacity: 6,
smokeSize: 102,
lineWidth: 22,
numCircles: 1
},
insertedItems: []
}
},
// 100
{
...radialGradient,
defaultLayout: 4,
textColor: "#000",
textBackgroundColor: "rgba(255, 255, 255, 0.2)",
thumb: "/thumbs/100.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: { palette: ["#FBC2EB", "#A18CD1"] },
insertedItems: [
{
type: "object",
width: 1019.5381882770871,
height: 1015.9857904085259,
showIframe: true,
adaptation: waterpipe,
configValues: {
palette: ["#ff3ba6", "#fdf5d4"],
opacity: 10,
smokeSize: 182,
lineWidth: 20,
numCircles: 1
},
position: { left: -0.8880994671403198, top: -10.657193605683837 },
id: 202,
rotation: 0
},
{
type: "object",
width: 1451.1545293072825,
height: 552.3978685612789,
showIframe: true,
adaptation: waterpipe,
configValues: {
palette: ["#ff3ba6", "#fdf5d4"],
opacity: 47,
smokeSize: 182,
lineWidth: 15,
numCircles: 1
},
position: { left: -333.03730017761995, top: 76.37655417406751 },
id: 102,
rotation: -45
}
]
}
},
// 101
{
...radialGradient,
thumb: "/thumbs/101.png",
textColor: "#fff",
defaultLayout: 0,
initState: {
size: { width: 1000, height: 1000 },
configValues: { palette: ["#ae65ff", "#3d0081"] },
insertedItems: [
{
type: "object",
width: 1019.5381882770871,
height: 742.4511545293074,
showIframe: true,
adaptation: waterpipe,
configValues: {
palette: ["#E5CB23", "#3d0081"],
opacity: 50,
smokeSize: 43,
lineWidth: 31,
numCircles: 1
},
position: { left: -0.8880994671403198, top: 129.66252220248668 },
id: 202,
rotation: 0
},
{
type: "object",
width: 1019.5381882770871,
height: 742.4511545293074,
showIframe: true,
adaptation: waterpipe,
configValues: {
palette: ["#3AD5FA", "#3d0081"],
opacity: 22,
smokeSize: 84,
lineWidth: 20,
numCircles: 1
},
position: { left: -4.440497335701599, top: 536.4120781527531 },
id: 102,
rotation: 0
},
{
type: "object",
width: 1019.5381882770871,
height: 742.4511545293074,
showIframe: true,
adaptation: waterpipe,
configValues: {
palette: ["#FF0097", "#3d0081"],
opacity: 50,
smokeSize: 84,
lineWidth: 3,
numCircles: 1
},
position: { left: -20.426287744227356, top: -257.54884547069275 },
id: 103,
rotation: 0
}
]
}
},
// 102
{
...radialGradient,
thumb: "/thumbs/102.png",
defaultLayout: 0,
textColor: "#fff",
initState: {
size: { width: 1000, height: 1000 },
configValues: { palette: ["#09203f", "#09203f"] },
insertedItems: [
{
type: "object",
width: 1211.3676731793962,
height: 880.9946714031972,
showIframe: true,
adaptation: waterpipe,
configValues: {
palette: ["#00c9ff", "#92fe9d"],
opacity: 10,
smokeSize: 113,
lineWidth: 20,
numCircles: 1
},
position: { left: -68.38365896980463, top: -42.62877442273535 },
id: 202,
rotation: -90
}
]
}
},
// 103
{
...mesh,
textColor: "#ffcf2c",
defaultLayout: 1,
thumb: "/thumbs/103.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
withBackground: true,
palette: ["#6f86d6", "#48c6ef"],
color: "#000",
distanceBetween: 5,
randomValues: [0.7612065417470708]
},
insertedItems: []
}
},
// 104
{
...mesh,
textColor: "#000",
defaultLayout: 2,
thumb: "/thumbs/104.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
withBackground: true,
palette: ["#d8fff8", "#000"],
color: "#000",
distanceBetween: 20,
randomValues: [0.6620720944262088]
},
insertedItems: []
}
},
// 105
{
...mesh,
textColor: "#000",
thumb: "/thumbs/105.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
withBackground: true,
palette: ["#d8ffe2", "#000"],
color: "#000",
distanceBetween: 40,
randomValues: [0.6620720944262088]
},
insertedItems: []
}
},
// 106
{
...mesh,
textColor: "#000",
thumb: "/thumbs/106.png",
defaultLayout: 4,
textBackgroundColor: "rgba(100, 200, 189, 0.5)",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
withBackground: true,
palette: ["#64c8bd", "#094a6f"],
color: "#000",
distanceBetween: 5,
randomValues: [0.6620720944262088]
},
insertedItems: []
}
},
// 107
{
...linearGradient,
textColor: "#000",
textBackgroundColor: "rgba(251, 194, 235, 0.44)",
defaultLayout: 0,
thumb: "/thumbs/107.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#A18CD1", "#FBC2EB"],
direction: "top",
angle: 200
},
insertedItems: [
{
id: 402,
type: "object",
width: 1080,
height: 1080,
showIframe: true,
adaptation: mesh,
configValues: {
withBackground: false,
palette: ["#593c2e", "#ffcf2c"],
color: "#ffffff",
distanceBetween: 7,
randomValues: [0.5307371650983657]
},
position: { left: 5, top: 6 },
rotation: 0
}
]
}
},
// 108
{
...linearGradient,
textColor: "#000",
textBackgroundColor: "rgba(255, 255, 255, 0.36)",
defaultLayout: 0,
thumb: "/thumbs/108.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#F6D365", "#FFB4BC"],
direction: "top",
angle: 200
},
insertedItems: [
{
id: 502,
type: "object",
width: 1080,
height: 1080,
showIframe: true,
adaptation: mesh,
configValues: {
withBackground: false,
palette: ["#593c2e", "#ffcf2c"],
color: "#ffffff",
distanceBetween: 5,
randomValues: [0.5307371650983657]
},
position: { left: 5, top: 6 },
rotation: 0
}
]
}
},
// 109
{
...linearGradient,
defaultLayout: 3,
textColor: "#fff",
textBackgroundColor: "rgba(61, 0, 129, 0.74)",
supportedLayout: [0, 1, 2],
thumb: "/thumbs/109.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#3d0081", "#3d0081"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 431,
height: 431,
showIframe: true,
adaptation: svgs[55],
configValues: { palette: ["#E5CB23", "#3d0081"], angle: 0 },
position: { left: 300, top: -59 },
id: 502,
rotation: 0
},
{
type: "object",
width: 174,
height: 224,
showIframe: true,
adaptation: svgs[56],
configValues: { palette: ["#FF0097", "#3d0081"], angle: 0 },
position: { left: 426, top: -4 },
id: 504,
rotation: 0
},
{
type: "object",
width: 531,
height: 521,
showIframe: true,
adaptation: svgs[61],
configValues: { palette: ["#3AD5FA", "#3F5CAB"], angle: 0 },
position: { left: 647, top: 670 },
id: 503,
rotation: 0
},
{
type: "object",
width: 326,
height: 180,
showIframe: true,
adaptation: svgs[62],
configValues: { palette: ["#E5CB23", "#3d0081"], angle: 0 },
position: { left: 746, top: 897 },
id: 505,
rotation: 0
},
{
type: "object",
width: 406,
height: 383,
showIframe: true,
adaptation: svgs[59],
configValues: { palette: ["#3AD5FA", "#3F5CAB"], angle: 0 },
position: { left: 165, top: 850 },
id: 507,
rotation: 0
},
{
type: "object",
width: 182,
height: 86,
showIframe: true,
adaptation: svgs[60],
configValues: { palette: ["#FF0097", "#3d0081"], angle: 0 },
position: { left: 290, top: 959 },
id: 508,
rotation: 0
},
{
type: "object",
width: 93,
height: 174,
showIframe: true,
adaptation: svgs[58],
configValues: {
palette: ["#3AD5FA", "#3F5CAB", "#3d0081"],
angle: 0
},
position: { left: 104, top: 151 },
id: 511,
rotation: 0
},
{
type: "object",
width: 218,
height: 42,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#3d0081", "#FF0097"], angle: 0 },
position: { left: -101, top: 445 },
id: 402,
rotation: 0
},
{
type: "object",
width: 174,
height: 42,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#3d0081", "#FF0097"], angle: 0 },
position: { left: 804, top: 852 },
id: 403,
rotation: -180
},
{
type: "object",
width: 172,
height: 36,
showIframe: true,
adaptation: svgs[53],
configValues: { palette: ["#3d0081", "#E5CB23"], angle: 0 },
position: { left: 825, top: 195 },
id: 404,
rotation: -90
},
{
type: "object",
width: 329,
height: 264,
showIframe: true,
adaptation: svgs[57],
configValues: { palette: ["#E5CB23", "#3d0081"], angle: 0 },
position: { left: -144, top: 547 },
id: 506,
rotation: 0
}
]
}
},
// 110
{
...blank,
textColor: "#000",
thumb: "/thumbs/110.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: { transparent: false, color: "#ffffff" },
insertedItems: [
{
type: "object",
width: 998.4905660377358,
height: 998.4905660377358,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#CFD9DF", "#E2EBF0"],
direction: "custom_angle",
angle: 200
},
position: { left: 37.049742710120064, top: 38.90222984562607 },
id: 302,
rotation: 0
},
{
type: "object",
width: 994.7855917667238,
height: 424.21955403087475,
showIframe: true,
adaptation: svgs[84],
configValues: {
palette: [{ r: 245, g: 206, b: 161, a: 0.02 }, "#eb8997"],
angle: 0
},
position: { left: 40.75471698113207, top: 466.8267581475128 },
id: 404,
rotation: 0
},
{
type: "object",
width: 998.4905660377358,
height: 507.5814751286449,
showIframe: true,
adaptation: svgs[88],
configValues: { palette: ["#FCCB90", "#FFB4BC"], angle: 0 },
position: { left: 37.049742710120064, top: 529.8113207547169 },
id: 403,
rotation: 0
},
{
type: "object",
width: 383.4648370497427,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 175.98627787307032, top: 281.5780445969125 },
id: 502,
rotation: -48
},
{
type: "object",
width: 242.67581475128642,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#fdfdfd", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 809.5368782161235, top: 150.05145797598627 },
id: 503,
rotation: -48
},
{
type: "object",
width: 166.7238421955403,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 474.23670668953685, top: 188.95368782161233 },
id: 504,
rotation: -48
}
]
}
},
// 111
{
...blank,
textColor: "#000",
thumb: "/thumbs/111.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: { transparent: false, color: "#ffffff" },
insertedItems: [
{
type: "object",
width: 1096.672384219554,
height: 1091.114922813036,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#FCCB90", "#FFB4BC"],
direction: "custom_angle",
angle: 200
},
position: { left: -5.5574614065180095, top: -3.7049742710120066 },
id: 402,
rotation: 0
},
{
type: "object",
width: 1102.229845626072,
height: 424.21955403087475,
showIframe: true,
adaptation: svgs[84],
configValues: { palette: ["#ffc57f", "#ff384c"], angle: 0 },
position: { left: -16.67238421955403, top: 605.763293310463 },
id: 504,
rotation: 0
},
{
type: "object",
width: 1105.934819897084,
height: 507.5814751286449,
showIframe: true,
adaptation: svgs[88],
configValues: { palette: ["#ffc57f", "#ff384c"], angle: 0 },
position: { left: -18.524871355060032, top: 694.6826758147512 },
id: 503,
rotation: 0
},
{
type: "object",
width: 383.4648370497427,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 663.1903945111492, top: 33.34476843910806 },
id: 602,
rotation: -48
},
{
type: "object",
width: 242.67581475128642,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#fdfdfd", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 809.5368782161235, top: 150.05145797598627 },
id: 603,
rotation: -48
},
{
type: "object",
width: 166.7238421955403,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 474.23670668953685, top: 190.80617495711834 },
id: 604,
rotation: -48
},
{
type: "object",
width: 166.7238421955403,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 148.19897084048026, top: 240.8233276157804 },
id: 102,
rotation: -48
},
{
type: "object",
width: 166.7238421955403,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 27.78730703259005, top: 294.5454545454545 },
id: 103,
rotation: -48
}
]
}
},
// 112
{
...blank,
thumb: "/thumbs/112.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: { transparent: false, color: "#ffffff" },
insertedItems: [
{
type: "object",
width: 998.4905660377358,
height: 998.4905660377358,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#77c0e1", "#eef6f9"],
direction: "custom_angle",
angle: 200
},
position: { left: 37.049742710120064, top: 38.90222984562607 },
id: 402,
rotation: 0
},
{
type: "object",
width: 994.7855917667238,
height: 424.21955403087475,
showIframe: true,
adaptation: svgs[84],
configValues: {
palette: [{ r: 255, g: 255, b: 255, a: 0.02 }, "#eef6f9"],
angle: 0
},
position: { left: 40.75471698113207, top: 466.8267581475128 },
id: 504,
rotation: 0
},
{
type: "object",
width: 998.4905660377358,
height: 507.5814751286449,
showIframe: true,
adaptation: svgs[88],
configValues: { palette: ["#ffffff", "#eef6f9"], angle: 0 },
position: { left: 37.049742710120064, top: 529.8113207547169 },
id: 503,
rotation: 0
},
{
type: "object",
width: 383.4648370497427,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 175.98627787307032, top: 281.5780445969125 },
id: 602,
rotation: -48
},
{
type: "object",
width: 242.67581475128642,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#fdfdfd", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 809.5368782161235, top: 150.05145797598627 },
id: 603,
rotation: -48
},
{
type: "object",
width: 166.7238421955403,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 474.23670668953685, top: 188.95368782161233 },
id: 604,
rotation: -48
}
]
}
},
// 113
{
...blank,
thumb: "/thumbs/113.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: { transparent: false, color: "#ffffff" },
insertedItems: [
{
type: "object",
width: 998.4905660377358,
height: 998.4905660377358,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#77c0e1", "#eef6f9"],
direction: "custom_angle",
angle: 200
},
position: { left: 37.049742710120064, top: 38.90222984562607 },
id: 502,
rotation: 0
},
{
type: "object",
width: 994.7855917667238,
height: 211.18353344768437,
showIframe: true,
adaptation: svgs[84],
configValues: {
palette: [{ r: 220, g: 237, b: 127, a: 0 }, "#f2f37e"],
angle: 0
},
position: { left: 40.75471698113207, top: 679.8627787307032 },
id: 604,
rotation: 0
},
{
type: "object",
width: 998.4905660377358,
height: 279.7255574614065,
showIframe: true,
adaptation: svgs[88],
configValues: { palette: ["#a0d9b4", "#f2f37e"], angle: 0 },
position: { left: 37.049742710120064, top: 757.6672384219553 },
id: 603,
rotation: 0
},
{
type: "object",
width: 383.4648370497427,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 175.98627787307032, top: 281.5780445969125 },
id: 702,
rotation: -48
},
{
type: "object",
width: 242.67581475128642,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#fdfdfd", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 809.5368782161235, top: 150.05145797598627 },
id: 703,
rotation: -48
},
{
type: "object",
width: 166.7238421955403,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 474.23670668953685, top: 188.95368782161233 },
id: 704,
rotation: -48
}
]
}
},
// 114
{
...blank,
textColor: "#fff",
thumb: "/thumbs/114.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: { transparent: false, color: "#ffffff" },
insertedItems: [
{
type: "object",
width: 998.4905660377358,
height: 998.4905660377358,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#7494d4", "#ffcac6"],
direction: "custom_angle",
angle: 200
},
position: { left: 37.049742710120064, top: 38.90222984562607 },
id: 602,
rotation: 0
},
{
type: "object",
width: 1000.3430531732417,
height: 268.6106346483705,
showIframe: true,
adaptation: svgs[83],
configValues: {
palette: [{ r: 239, g: 231, b: 224, a: 0.36 }, "#f7bbba"],
angle: 0
},
position: { left: 35.19725557461406, top: 622.4356775300171 },
id: 704,
rotation: 0
},
{
type: "object",
width: 1002.1955403087478,
height: 311.21783876500854,
showIframe: true,
adaptation: svgs[86],
configValues: { palette: ["#fde9da", "#ff9ea3"], angle: 0 },
position: { left: 33.34476843910806, top: 726.1749571183533 },
id: 703,
rotation: 0
},
{
type: "object",
width: 383.4648370497427,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 629.8456260720411, top: 20.377358490566035 },
id: 802,
rotation: -48
},
{
type: "object",
width: 242.67581475128642,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#fdfdfd", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 809.5368782161235, top: 150.05145797598627 },
id: 803,
rotation: -48
},
{
type: "object",
width: 166.7238421955403,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 474.23670668953685, top: 188.95368782161233 },
id: 804,
rotation: -48
},
{
type: "object",
width: 166.7238421955403,
height: 7.409948542024013,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 255, g: 255, b: 255, a: 0 }],
angle: 0
},
position: { left: 127.82161234991423, top: 326.03773584905656 },
id: 102,
rotation: -48
}
]
}
},
// 115
{
...blank,
thumb: "/thumbs/115.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: { transparent: false, color: "#ffffff" },
insertedItems: [
{
type: "object",
width: 1095.379746835443,
height: 1090.253164556962,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#ffffff", "#FFB4BC"],
direction: "custom_angle",
angle: 200
},
position: { left: -5.981012658227849, top: -5.126582278481013 },
id: 502,
rotation: 0
},
{
type: "object",
width: 1102.2151898734178,
height: 423.7974683544304,
showIframe: true,
adaptation: svgs[84],
configValues: { palette: ["#FFB4BC", "#ff384c"], angle: 0 },
position: { left: -17.943037974683545, top: 604.9367088607595 },
id: 604,
rotation: 0
},
{
type: "object",
width: 1105.632911392405,
height: 507.5316455696203,
showIframe: true,
adaptation: svgs[88],
configValues: { palette: ["#ff384c", "#FFB4BC"], angle: 0 },
position: { left: -19.651898734177216, top: 693.7974683544304 },
id: 603,
rotation: 0
},
{
type: "object",
width: 382.78481012658233,
height: 6.835443037974684,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 662.1835443037975, top: 32.46835443037975 },
id: 702,
rotation: -48
},
{
type: "object",
width: 242.6582278481013,
height: 6.835443037974684,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#fdfdfd", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 809.1455696202532, top: 148.67088607594937 },
id: 703,
rotation: -48
},
{
type: "object",
width: 165.7594936708861,
height: 6.835443037974684,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 474.2088607594937, top: 189.68354430379748 },
id: 704,
rotation: -48
},
{
type: "object",
width: 165.7594936708861,
height: 6.835443037974684,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 147.81645569620255, top: 239.24050632911394 },
id: 202,
rotation: -48
},
{
type: "object",
width: 165.7594936708861,
height: 6.835443037974684,
showIframe: true,
adaptation: svgs[53],
configValues: {
palette: ["#ffffff", { r: 237, g: 234, b: 156, a: 0 }],
angle: 0
},
position: { left: 26.4873417721519, top: 293.9240506329114 },
id: 203,
rotation: -48
}
]
}
},
// 116
{
...blank,
thumb: "/thumbs/116.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: { transparent: false, color: "#ffffff" },
insertedItems: [
{
type: "object",
width: 1098.52487135506,
height: 1096.672384219554,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#c4c9ff", "#FAD0C4"],
direction: "custom_angle",
angle: 230
},
position: { left: -7.409948542024013, top: -5.5574614065180095 },
id: 102,
rotation: 0
},
{
type: "object",
width: 1100.377358490566,
height: 422.36706689536874,
showIframe: true,
adaptation: svgs[84],
configValues: { palette: ["#fee7f4", "#c4c9ff"], angle: 0 },
position: { left: -18.524871355060032, top: 603.9108061749571 },
id: 704,
rotation: 0
},
{
type: "object",
width: 1104.0823327615778,
height: 505.7289879931389,
showIframe: true,
adaptation: svgs[88],
configValues: { palette: ["#fee7f4", "#c4c9ff"], angle: 0 },
position: { left: -20.377358490566035, top: 692.8301886792452 },
id: 703,
rotation: 0
}
]
}
},
// 117
{
...linearGradient,
thumb: "/thumbs/117.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#fceff6", "#ebf1ff"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 345.48387096774195,
height: 304.83870967741933,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#EABDD9", "#B0C5F8"], angle: 0 },
position: { left: 680.8064516129032, top: 90 },
id: 608,
rotation: 0
},
{
type: "object",
width: 52.25806451612903,
height: 49.354838709677416,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#4BBFD6", "#8456D7"], angle: 0 },
position: { left: 712.741935483871, top: 142.25806451612902 },
id: 605,
rotation: 0
},
{
type: "object",
width: 191.61290322580646,
height: 188.70967741935485,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 42.096774193548384, top: 847.741935483871 },
id: 607,
rotation: 0
},
{
type: "object",
width: 911.6129032258065,
height: 783.8709677419355,
showIframe: true,
adaptation: svgs[140],
configValues: {
palette: ["#ffffff", { r: 255, g: 255, b: 255, a: 0.7 }],
angle: 0
},
position: { left: -312.0967741935484, top: -252.58064516129033 },
id: 403,
rotation: 0
},
{
type: "object",
width: 58.064516129032256,
height: 58.064516129032256,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#fffa34", "#539200"], angle: 0 },
position: { left: 245.32258064516128, top: 220.6451612903226 },
id: 606,
rotation: 0
},
{
type: "object",
width: 583.5483870967741,
height: 493.5483870967742,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffffff", "#cbd8f9"], angle: 0 },
position: { left: 669.1935483870968, top: 711.2903225806451 },
id: 202,
rotation: 0
},
{
type: "object",
width: 281.61290322580646,
height: 249.67741935483872,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffffff", "#cbd8f9"], angle: 0 },
position: { left: 596.6129032258065, top: 705.483870967742 },
id: 402,
rotation: 0
}
]
}
},
// 118
{
...linearGradient,
thumb: "/thumbs/118.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#A18CD1", "#FBC2EB"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 344.5626072041166,
height: 303.80789022298455,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#A18CD1", "#FBC2EB"], angle: 0 },
position: { left: 646.5180102915951, top: 37.049742710120064 },
id: 708,
rotation: 0
},
{
type: "object",
width: 51.869639794168094,
height: 48.16466552315609,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#4BBFD6", "#8456D7"], angle: 0 },
position: { left: 711.3550600343052, top: 140.78902229845625 },
id: 705,
rotation: 0
},
{
type: "object",
width: 190.80617495711834,
height: 187.10120068610632,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 16.67238421955403, top: 579.828473413379 },
id: 707,
rotation: 0
},
{
type: "object",
width: 1196.7066895368782,
height: 916.9811320754716,
showIframe: true,
adaptation: svgs[140],
configValues: {
palette: [
{ r: 255, g: 255, b: 255, a: 0.68 },
{ r: 255, g: 255, b: 255, a: 0.7 }
],
angle: 0
},
position: { left: -565.008576329331, top: -398.2847341337907 },
id: 503,
rotation: 0
},
{
type: "object",
width: 57.4271012006861,
height: 57.4271012006861,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#fffa34", "#539200"], angle: 0 },
position: { left: 426.07204116638076, top: 75.95197255574614 },
id: 706,
rotation: 0
},
{
type: "object",
width: 583.533447684391,
height: 492.7615780445969,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffffff", "#cbd8f9"], angle: 0 },
position: { left: 611.3207547169811, top: 742.8473413379073 },
id: 302,
rotation: 0
},
{
type: "object",
width: 281.5780445969125,
height: 248.23327615780443,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffffff", "#cbd8f9"], angle: 0 },
position: { left: 892.8987993138936, top: 931.8010291595197 },
id: 502,
rotation: 0
}
]
}
},
// 119
{
...linearGradient,
thumb: "/thumbs/119.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#FAD0C4", "#FFD1FF"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 344.5626072041166,
height: 303.80789022298455,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#A18CD1", "#FBC2EB"], angle: 0 },
position: { left: 646.5180102915951, top: 37.049742710120064 },
id: 808,
rotation: 0
},
{
type: "object",
width: 51.869639794168094,
height: 48.16466552315609,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#4BBFD6", "#8456D7"], angle: 0 },
position: { left: 850.2915951972556, top: 213.03602058319038 },
id: 805,
rotation: 0
},
{
type: "object",
width: 190.80617495711834,
height: 187.10120068610632,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 116.7066895368782, top: 883.6363636363635 },
id: 807,
rotation: 0
},
{
type: "object",
width: 1196.7066895368782,
height: 916.9811320754716,
showIframe: true,
adaptation: svgs[140],
configValues: {
palette: [
{ r: 255, g: 255, b: 255, a: 0.68 },
{ r: 255, g: 255, b: 255, a: 0.7 }
],
angle: 0
},
position: { left: -565.008576329331, top: -398.2847341337907 },
id: 603,
rotation: 0
},
{
type: "object",
width: 57.4271012006861,
height: 57.4271012006861,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#fffa34", "#539200"], angle: 0 },
position: { left: 159.3138936535163, top: 148.19897084048026 },
id: 806,
rotation: 0
},
{
type: "object",
width: 583.533447684391,
height: 492.7615780445969,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffffff", "#cbd8f9"], angle: 0 },
position: { left: 387.16981132075466, top: 763.2246998284734 },
id: 402,
rotation: 0
},
{
type: "object",
width: 281.5780445969125,
height: 248.23327615780443,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffffff", "#cbd8f9"], angle: 0 },
position: { left: 892.8987993138936, top: 931.8010291595197 },
id: 602,
rotation: 0
}
]
}
},
// 120
{
...linearGradient,
thumb: "/thumbs/120.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#A1C4FD", "#C2E9FB"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 1196.7066895368782,
height: 916.9811320754716,
showIframe: true,
adaptation: svgs[140],
configValues: {
palette: [
{ r: 255, g: 255, b: 255, a: 0.68 },
{ r: 255, g: 255, b: 255, a: 0.7 }
],
angle: 0
},
position: { left: -565.008576329331, top: -398.2847341337907 },
id: 703,
rotation: 0
},
{
type: "object",
width: 652.0754716981131,
height: 548.336192109777,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffffff", "#cbd8f9"], angle: 0 },
position: { left: 618.730703259005, top: 776.1921097770154 },
id: 502,
rotation: 0
},
{
type: "object",
width: 57.4271012006861,
height: 57.4271012006861,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#D4FC79", "#96E6A1"], angle: 0 },
position: { left: 75.95197255574614, top: 64.83704974271012 },
id: 906,
rotation: 0
},
{
type: "object",
width: 190.80617495711834,
height: 187.10120068610632,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#A6C0FE", "#F68084"], angle: 0 },
position: { left: 844.7341337907375, top: 928.0960548885076 },
id: 907,
rotation: 0
},
{
type: "object",
width: 820.6518010291594,
height: 740.9948542024013,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffffff", "#cbd8f9"], angle: 0 },
position: { left: -259.3481989708405, top: 544.631217838765 },
id: 104,
rotation: 0
},
{
type: "object",
width: 159.3138936535163,
height: 150.05145797598627,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#F6D365", "#FFB4BC"], angle: 0 },
position: { left: 37.049742710120064, top: 729.8799313893653 },
id: 102,
rotation: 0
},
{
type: "object",
width: 344.5626072041166,
height: 316.77530017152657,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ea68a6", "#fcd3b3"], angle: 0 },
position: { left: 92.62435677530016, top: 779.8970840480274 },
id: 103,
rotation: 0
},
{
type: "object",
width: 344.5626072041166,
height: 316.77530017152657,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#F6D365", "#FFB4BC"], angle: 0 },
position: { left: 646.5180102915951, top: 27.78730703259005 },
id: 908,
rotation: 0
},
{
type: "object",
width: 51.869639794168094,
height: 48.16466552315609,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ff9966", "#ff5e62"], angle: 0 },
position: { left: 896.6037735849056, top: 268.6106346483705 },
id: 905,
rotation: 0
}
]
}
},
// 121
{
...linearGradient,
textColor: "#fff",
thumb: "/thumbs/121.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#8e2de2", "#4a00e0"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 911.4236706689536,
height: 783.6020583190394,
showIframe: true,
adaptation: svgs[140],
configValues: {
palette: ["#5a00ff", { r: "225", g: "141", b: "255", a: "0.7" }],
angle: 0
},
position: { left: 474.23670668953685, top: 531.663807890223 },
id: 103,
rotation: 0
},
{
type: "object",
width: 190.80617495711834,
height: 187.10120068610632,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#0fd850", "#f9f047"], angle: 0 },
position: { left: 828.0617495711834, top: 74.09948542024013 },
id: 707,
rotation: 0
},
{
type: "object",
width: 911.4236706689536,
height: 783.6020583190394,
showIframe: true,
adaptation: svgs[140],
configValues: {
palette: ["#5a00ff", { r: "225", g: "141", b: "255", a: "0.7" }],
angle: 0
},
position: { left: -446.4493996569468, top: -359.3825042881646 },
id: 503,
rotation: 0
},
{
type: "object",
width: 583.533447684391,
height: 492.7615780445969,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#A6C0FE", "#F68084"], angle: 0 },
position: { left: 622.4356775300171, top: 770.6346483704974 },
id: 302,
rotation: 0
},
{
type: "object",
width: 57.4271012006861,
height: 57.4271012006861,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#A6C0FE", "#F68084"], angle: 0 },
position: { left: 248.23327615780443, top: 887.3413379073755 },
id: 706,
rotation: 0
},
{
type: "object",
width: 51.869639794168094,
height: 48.16466552315609,
showIframe: true,
adaptation: svgs[138],
configValues: { palette: ["#FFECD2", "#FCB69F"], angle: 0 },
position: { left: 144.49399656946827, top: 207.47855917667238 },
id: 705,
rotation: 0
},
{
type: "object",
width: 283.4305317324185,
height: 263.05317324185245,
showIframe: true,
adaptation: svgs[140],
configValues: {
palette: ["#EABDD9", { r: "225", g: "141", b: "255", a: "0.7" }],
angle: 0
},
position: { left: 131.52658662092622, top: 37.049742710120064 },
id: 708,
rotation: 0
},
{
type: "object",
width: 911.4236706689536,
height: 783.6020583190394,
showIframe: true,
adaptation: svgs[140],
configValues: {
palette: ["#5a00ff", { r: "225", g: "141", b: "255", a: "0.7" }],
angle: 0
},
position: { left: -594.6483704974271, top: 331.5951972555746 },
id: 102,
rotation: 0
}
]
}
},
// 122
{
...linearGradient,
textColor: "#fff",
thumb: "/thumbs/122.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#370300", "#ed4737"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 190.80617495711834,
height: 187.10120068610632,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 116.7066895368782, top: 883.6363636363635 },
id: 907,
rotation: 0
},
{
type: "object",
width: 190.80617495711834,
height: 187.10120068610632,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 1.8524871355060033, top: 566.861063464837 },
id: 102,
rotation: 0
},
{
type: "object",
width: 190.80617495711834,
height: 187.10120068610632,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 44.459691252144076, top: 168.5763293310463 },
id: 103,
rotation: 0
},
{
type: "object",
width: 111.1492281303602,
height: 111.1492281303602,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 448.3018867924528, top: 785.4545454545454 },
id: 104,
rotation: 0
},
{
type: "object",
width: 190.80617495711834,
height: 187.10120068610632,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 618.730703259005, top: 954.0308747855917 },
id: 105,
rotation: 0
},
{
type: "object",
width: 190.80617495711834,
height: 187.10120068610632,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 920.6861063464836, top: 620.5831903945111 },
id: 106,
rotation: 0
},
{
type: "object",
width: 240.8233276157804,
height: 229.7084048027444,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 905.8662092624356, top: -70.39451114922812 },
id: 107,
rotation: 0
},
{
type: "object",
width: 111.1492281303602,
height: 111.1492281303602,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 678.0102915951971, top: 188.95368782161233 },
id: 108,
rotation: 0
},
{
type: "object",
width: 55.5746140651801,
height: 53.7221269296741,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbda00", "#f91515"], angle: 0 },
position: { left: 479.7941680960549, top: 31.492281303602056 },
id: 109,
rotation: 0
}
]
}
},
// 123
{
...linearGradient,
textColor: "#fff",
thumb: "/thumbs/123.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#000000", "#1b4471"],
direction: "custom_angle",
angle: 324
},
insertedItems: [
{
type: "object",
width: 189.68354430379748,
height: 186.26582278481015,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#00ffac", "#003369"], angle: 0 },
position: { left: 115.34810126582279, top: 883.4810126582279 },
id: 1007,
rotation: 0
},
{
type: "object",
width: 189.68354430379748,
height: 186.26582278481015,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#00ffac", "#003369"], angle: 0 },
position: { left: 0.8544303797468356, top: 565.632911392405 },
id: 202,
rotation: 0
},
{
type: "object",
width: 189.68354430379748,
height: 186.26582278481015,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#00ffac", "#003369"], angle: 0 },
position: { left: 43.57594936708861, top: 167.46835443037975 },
id: 203,
rotation: 0
},
{
type: "object",
width: 111.07594936708861,
height: 111.07594936708861,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#00ffac", "#003369"], angle: 0 },
position: { left: 446.86708860759495, top: 784.367088607595 },
id: 204,
rotation: 0
},
{
type: "object",
width: 189.68354430379748,
height: 186.26582278481015,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#00ffac", "#003369"], angle: 0 },
position: { left: 617.753164556962, top: 953.5443037974684 },
id: 205,
rotation: 0
},
{
type: "object",
width: 189.68354430379748,
height: 186.26582278481015,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#00ffac", "#003369"], angle: 0 },
position: { left: 920.2215189873418, top: 620.3164556962025 },
id: 206,
rotation: 0
},
{
type: "object",
width: 239.24050632911394,
height: 228.98734177215192,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#00ffac", "#003369"], angle: 0 },
position: { left: 904.8417721518988, top: -70.0632911392405 },
id: 207,
rotation: 0
},
{
type: "object",
width: 111.07594936708861,
height: 111.07594936708861,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#00ffac", "#003369"], angle: 0 },
position: { left: 677.5632911392405, top: 187.97468354430382 },
id: 208,
rotation: 0
},
{
type: "object",
width: 54.683544303797476,
height: 52.9746835443038,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#00ffac", "#003369"], angle: 0 },
position: { left: 479.3354430379747, top: 30.75949367088608 },
id: 209,
rotation: 0
}
]
}
},
// 124
{
...linearGradient,
thumb: "/thumbs/124.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ffffff", "#ffffff"],
direction: "custom_angle",
angle: 324
},
insertedItems: [
{
type: "object",
width: 188.95368782161233,
height: 185.2487135506003,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#ffad96", "#eb1e80"], angle: 0 },
position: { left: 114.8542024013722, top: 883.6363636363635 },
id: 1107,
rotation: 0
},
{
type: "object",
width: 188.95368782161233,
height: 185.2487135506003,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#FFECD2", "#FCB69F"], angle: 0 },
position: { left: 0, top: 565.008576329331 },
id: 302,
rotation: 0
},
{
type: "object",
width: 188.95368782161233,
height: 185.2487135506003,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#fbfa00", "#98e5d9"], angle: 0 },
position: { left: 42.60720411663807, top: 166.7238421955403 },
id: 303,
rotation: 0
},
{
type: "object",
width: 109.29674099485419,
height: 109.29674099485419,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#FBC2EB", "#A18CD1"], angle: 0 },
position: { left: 446.4493996569468, top: 783.6020583190394 },
id: 304,
rotation: 0
},
{
type: "object",
width: 188.95368782161233,
height: 185.2487135506003,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#b2cfff", "#2178ff"], angle: 0 },
position: { left: 646.5180102915951, top: 948.4734133790737 },
id: 305,
rotation: 0
},
{
type: "object",
width: 188.95368782161233,
height: 185.2487135506003,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#6d107e", "#f03358"], angle: 0 },
position: { left: 918.8336192109776, top: 618.730703259005 },
id: 306,
rotation: 0
},
{
type: "object",
width: 238.97084048027443,
height: 227.8559176672384,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#00ffac", "#003369"], angle: 0 },
position: { left: 904.0137221269296, top: -68.54202401372213 },
id: 307,
rotation: 0
},
{
type: "object",
width: 109.29674099485419,
height: 109.29674099485419,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#780206", "#061161"], angle: 0 },
position: { left: 676.1578044596912, top: 187.10120068610632 },
id: 308,
rotation: 0
},
{
type: "object",
width: 53.7221269296741,
height: 51.869639794168094,
showIframe: true,
adaptation: svgs[139],
configValues: { palette: ["#ffb347", "#ffcc33"], angle: 0 },
position: { left: 490.9090909090909, top: 22.229845626072038 },
id: 309,
rotation: 0
}
]
}
},
// 125
{
...gradientWaves,
defaultLayout: 6,
textColor: "#fff",
thumb: "/thumbs/125.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
amplituteX: 150,
amplituteY: 30,
crazyness: false,
fill: true,
lines: 70,
palette: ["#00fb94", "#006b65"],
smoothness: 98,
randomValues: []
},
insertedItems: []
}
},
// 126
{
...gradientWaves,
textColor: "#fff",
thumb: "/thumbs/126.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#d7f6f0", "#4d0eb3"],
lines: 61,
amplituteX: 136,
amplituteY: 71,
smoothness: 98,
fill: true,
randomValues: []
},
insertedItems: []
}
},
// 127
{
...gradientWaves,
thumb: "/thumbs/127.png",
textColor: "#fff",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#e67842", "#003d3a"],
lines: 13,
amplituteX: 150,
amplituteY: 30,
smoothness: 98,
fill: true,
randomValues: []
},
insertedItems: []
}
},
// 128
{
...gradientWaves,
thumb: "/thumbs/128.png",
defaultLayout: 0,
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#f6a682", "#00c7ff"],
lines: 20,
amplituteX: 150,
amplituteY: 30,
smoothness: 29,
fill: true,
randomValues: []
},
insertedItems: []
}
},
// 129
{
...gradientWaves,
thumb: "/thumbs/129.png",
defaultLayout: 0,
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#fb9567", "#670200"],
lines: 13,
amplituteX: 150,
amplituteY: 30,
smoothness: 29,
fill: true,
randomValues: []
},
insertedItems: []
}
},
// 130
{
...gradientWaves,
thumb: "/thumbs/130.png",
defaultLayout: 0,
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ffcd97", "#3d005a"],
lines: 13,
amplituteX: 150,
amplituteY: 30,
smoothness: 1,
fill: true,
randomValues: []
},
insertedItems: []
}
},
// 131
{
...gradientBubbles,
thumb: "/thumbs/131.png",
textColor: "#d7ff00",
textBackgroundColor: "rgba(190, 227, 246, 0.26)",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#bee3f6", "#857a95"],
itemSize: 18,
itemsNumInRow: 16,
padding: 50,
angle: 360,
itemType: "circle",
rounding: 20,
randomValues: []
},
insertedItems: [
{
type: "object",
width: 707.6500857632933,
height: 642.8130360205831,
showIframe: true,
adaptation: svgs[103],
configValues: {
palette: [
{ r: 190, g: 227, b: 246, a: 0.67 },
{ r: 133, g: 122, b: 149, a: 0.9 }
],
angle: 0
},
position: { left: 174.1337907375643, top: 255.64322469982847 },
id: 203,
rotation: 0
}
]
}
},
// 132
{
...gradientBubbles,
textColor: "#d7ff00",
thumb: "/thumbs/132.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#dba430", "#921000"],
itemSize: 18,
itemsNumInRow: 16,
padding: 50,
angle: 360,
itemType: "circle",
rounding: 20,
randomValues: []
},
insertedItems: [
{
type: "object",
width: 707.6500857632933,
height: 642.8130360205831,
showIframe: true,
adaptation: svgs[108],
configValues: { palette: ["#921000", "#dba430"], angle: 0 },
position: { left: 174.1337907375643, top: 255.64322469982847 },
id: 303,
rotation: 0
}
]
}
},
// 133
{
...gradientBubbles,
thumb: "/thumbs/133.png",
defaultLayout: 1,
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#fcdb33", "#2f7b19"],
itemSize: 18,
itemsNumInRow: 16,
padding: 50,
angle: 360,
itemType: "circle",
rounding: 20,
randomValues: []
},
insertedItems: [
{
type: "object",
width: 781.7495711835334,
height: 642.8130360205831,
showIframe: true,
adaptation: svgs[100],
configValues: {
palette: ["#45942c", { r: 255, g: 255, b: 255, a: 0.17 }],
angle: 0
},
position: { left: 148.19897084048026, top: 251.93825042881645 },
id: 403,
rotation: 0
}
]
}
},
// 134
{
...gradientBubbles,
thumb: "/thumbs/134.png",
defaultLayout: 2,
textBackgroundColor: "rgba(255, 255, 255, 0.28)",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#256eb0", "#ffffff"],
itemSize: 11,
itemsNumInRow: 31,
padding: 50,
angle: 278,
itemType: "circle",
rounding: 20,
randomValues: []
},
insertedItems: [
{
type: "object",
width: 807.6843910806174,
height: 720.6174957118353,
showIframe: true,
adaptation: svgs[100],
configValues: {
palette: [
{ r: 255, g: 255, b: 255, a: 0 },
{ r: 255, g: 255, b: 255, a: 0.98 }
],
angle: 0
},
position: { left: 125.96912521440822, top: 142.64150943396226 },
id: 303,
rotation: 0
}
]
}
},
// 135
{
...gradientBubbles,
thumb: "/thumbs/135.png",
defaultLayout: 1,
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#273e45", "#ff5922"],
itemSize: 19,
itemsNumInRow: 31,
padding: 50,
angle: 360,
itemType: "square",
rounding: 20,
randomValues: []
},
insertedItems: []
}
},
// 136
{
...gradientBubbles,
thumb: "/thumbs/136.png",
defaultLayout: 0,
textColor: "#3c4604",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#dba430", "#d1fcff"],
itemSize: 65,
itemsNumInRow: 16,
padding: 35,
angle: 360,
itemType: "circle",
rounding: 20,
randomValues: [0.7746762033670576]
},
insertedItems: [
{
type: "object",
width: 870.6689536878215,
height: 722.4699828473413,
showIframe: true,
adaptation: svgs[110],
configValues: {
palette: [{ r: 219, g: 164, b: 48, a: 0 }, "#d1fcff"],
angle: 0
},
position: { left: 114.8542024013722, top: 100.03430531732418 },
id: 403,
rotation: 0
}
]
}
},
// 137
{
...linearGradient,
defaultLayout: 1,
thumb: "/thumbs/137.png",
textColor: "#fff",
title: "Glitchy elements",
author: "Anna Taran",
objectPack: "Glitchy",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#371b41", "#722345"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 539.0408525754885,
height: 364.47602131438725,
showIframe: true,
adaptation: svgs[73],
configValues: { palette: ["#722345", "#FF2200"], angle: 0 },
position: { left: -5.754884547069272, top: 732.7886323268207 },
id: 202,
rotation: 0
},
{
type: "object",
width: 228.2770870337478,
height: 464.227353463588,
showIframe: true,
adaptation: svgs[68],
configValues: { palette: ["#be1024", "#be1024"], angle: 0 },
position: { left: 209.0941385435169, top: 627.2824156305506 },
id: 203,
rotation: 0
},
{
type: "object",
width: 399.0053285968029,
height: 366.39431616341034,
showIframe: true,
adaptation: svgs[76],
configValues: { palette: ["#FF2200", "#722345"], angle: 0 },
position: { left: -9.591474245115453, top: -24.93783303730018 },
id: 204,
rotation: 0
},
{
type: "object",
width: 199.50266429840144,
height: 408.5968028419183,
showIframe: true,
adaptation: svgs[71],
configValues: {
palette: [{ r: 65, g: 32, b: 59, a: 0 }, "#be1024"],
angle: 0
},
position: { left: 527.5310834813499, top: 679.0763765541741 },
id: 205,
rotation: 0
},
{
type: "object",
width: 249.3783303730018,
height: 354.8845470692718,
showIframe: true,
adaptation: svgs[77],
configValues: {
palette: [{ r: "122", g: "28", b: "67", a: "0" }, "#FF2200"],
angle: 0
},
position: { left: 372.1492007104796, top: 151.54529307282417 },
id: 207,
rotation: 180
},
{
type: "object",
width: 539.0408525754885,
height: 358.72113676731794,
showIframe: true,
adaptation: svgs[74],
configValues: {
palette: [{ r: 122, g: 28, b: 67, a: 0 }, "#FF2200"],
angle: 0
},
position: { left: 544.7957371225577, top: -9.591474245115453 },
id: 206,
rotation: 180
},
{
type: "object",
width: 239.78685612788635,
height: 539.0408525754885,
showIframe: true,
adaptation: svgs[78],
configValues: {
palette: ["#FF2200", { r: 122, g: 28, b: 67, a: 0 }],
angle: 0
},
position: { left: 220.60390763765542, top: -3.8365896980461813 },
id: 208,
rotation: 0
},
{
type: "object",
width: 381.74067495559507,
height: 395.1687388987567,
showIframe: true,
adaptation: svgs[79],
configValues: { palette: ["#722345", "#FF2200"], angle: 0 },
position: { left: 725.1154529307283, top: 732.7886323268207 },
id: 210,
rotation: 0
}
]
}
},
// 138
{
...linearGradient,
textColor: "#71495a",
defaultLayout: 3,
thumb: "/thumbs/138.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#92a9d5", "#deb3d1"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 537.221269296741,
height: 363.08747855917665,
showIframe: true,
adaptation: svgs[73],
configValues: { palette: ["#deb3d1", "#fca1c8"], angle: 0 },
position: { left: -7.409948542024013, top: 731.7324185248713 },
id: 302,
rotation: 0
},
{
type: "object",
width: 227.8559176672384,
height: 463.12178387650084,
showIframe: true,
adaptation: svgs[68],
configValues: { palette: ["#fca1c8", "#fca1c8"], angle: 0 },
position: { left: 207.47855917667238, top: 626.1406518010291 },
id: 303,
rotation: 0
},
{
type: "object",
width: 398.2847341337907,
height: 364.93996569468266,
showIframe: true,
adaptation: svgs[76],
configValues: { palette: ["#fca1c8", "#deb3d1"], angle: 0 },
position: { left: -11.114922813036019, top: -25.934819897084047 },
id: 304,
rotation: 0
},
{
type: "object",
width: 198.21612349914236,
height: 407.5471698113207,
showIframe: true,
adaptation: svgs[72],
configValues: {
palette: [{ r: 65, g: 32, b: 59, a: 0 }, "#fca1c8"],
angle: 0
},
position: { left: 500.17152658662087, top: 670.6003430531732 },
id: 305,
rotation: 0
},
{
type: "object",
width: 248.23327615780443,
height: 353.82504288164665,
showIframe: true,
adaptation: svgs[77],
configValues: {
palette: [{ r: 163, g: 162, b: 199, a: 0.41 }, "#fca1c8"],
angle: 0
},
position: { left: 370.4974271012006, top: 150.05145797598627 },
id: 307,
rotation: 180
},
{
type: "object",
width: 537.221269296741,
height: 357.5300171526586,
showIframe: true,
adaptation: svgs[74],
configValues: {
palette: [{ r: 163, g: 162, b: 199, a: 0.25 }, "#fca1c8"],
angle: 0
},
position: { left: 544.631217838765, top: -11.114922813036019 },
id: 306,
rotation: 180
},
{
type: "object",
width: 248.23327615780443,
height: 372.34991423670664,
showIframe: true,
adaptation: svgs[78],
configValues: {
palette: ["#a3a2c7", { r: 122, g: 28, b: 67, a: 0 }],
angle: 0
},
position: { left: 220.4459691252144, top: -5.5574614065180095 },
id: 308,
rotation: 0
},
{
type: "object",
width: 381.6123499142367,
height: 394.5797598627787,
showIframe: true,
adaptation: svgs[79],
configValues: { palette: ["#deb3d1", "#fca1c8"], angle: 0 },
position: { left: 724.3224699828473, top: 731.7324185248713 },
id: 310,
rotation: 0
},
{
type: "object",
width: 227.8559176672384,
height: 463.12178387650084,
showIframe: true,
adaptation: svgs[68],
configValues: { palette: ["#fca1c8", "#a3a2c7"], angle: 0 },
position: { left: 626.1406518010291, top: 740.9948542024013 },
id: 102,
rotation: 0
}
]
}
},
// 139
{
...linearGradient,
thumb: "/thumbs/139.png",
defaultLayout: 2,
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#000000", "#1b4471"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 248.23327615780443,
height: 416.80960548885076,
showIframe: true,
adaptation: svgs[78],
configValues: { palette: ["#00ffac", "#013773"], angle: 0 },
position: { left: 689.1252144082332, top: -24.082332761578044 },
id: 103,
rotation: 0
},
{
type: "object",
width: 537.221269296741,
height: 363.08747855917665,
showIframe: true,
adaptation: svgs[73],
configValues: { palette: ["#1b4471", "#00ffac"], angle: 0 },
position: { left: -7.409948542024013, top: 731.7324185248713 },
id: 402,
rotation: 0
},
{
type: "object",
width: 227.8559176672384,
height: 463.12178387650084,
showIframe: true,
adaptation: svgs[68],
configValues: { palette: ["#00ffac", "#00ffac"], angle: 0 },
position: { left: 224.1509433962264, top: 707.6500857632933 },
id: 403,
rotation: 0
},
{
type: "object",
width: 398.2847341337907,
height: 364.93996569468266,
showIframe: true,
adaptation: svgs[76],
configValues: { palette: ["#00ffac", "#1b4471"], angle: 0 },
position: { left: -11.114922813036019, top: -25.934819897084047 },
id: 404,
rotation: 0
},
{
type: "object",
width: 198.21612349914236,
height: 407.5471698113207,
showIframe: true,
adaptation: svgs[72],
configValues: { palette: ["#013773", "#00ffac"], angle: 0 },
position: { left: 500.17152658662087, top: 679.8627787307032 },
id: 405,
rotation: 0
},
{
type: "object",
width: 248.23327615780443,
height: 353.82504288164665,
showIframe: true,
adaptation: svgs[77],
configValues: { palette: ["#1b4471", "#00ffac"], angle: 0 },
position: { left: 292.6929674099485, top: 22.229845626072038 },
id: 407,
rotation: 180
},
{
type: "object",
width: 248.23327615780443,
height: 372.34991423670664,
showIframe: true,
adaptation: svgs[78],
configValues: { palette: ["#00ffac", "#013773"], angle: 0 },
position: { left: 146.34648370497425, top: -40.75471698113207 },
id: 408,
rotation: 0
},
{
type: "object",
width: 381.6123499142367,
height: 394.5797598627787,
showIframe: true,
adaptation: svgs[79],
configValues: { palette: ["#1b4471", "#00ffac"], angle: 0 },
position: { left: 724.3224699828473, top: 731.7324185248713 },
id: 410,
rotation: 0
},
{
type: "object",
width: 227.8559176672384,
height: 463.12178387650084,
showIframe: true,
adaptation: svgs[68],
configValues: { palette: ["#013773", "#00ffac"], angle: 0 },
position: { left: 655.7804459691251, top: 722.4699828473413 },
id: 202,
rotation: 0
},
{
type: "object",
width: 248.23327615780443,
height: 372.34991423670664,
showIframe: true,
adaptation: svgs[78],
configValues: { palette: ["#00ffac", "#013773"], angle: 0 },
position: { left: 433.48198970840474, top: -20.377358490566035 },
id: 102,
rotation: 0
},
{
type: "object",
width: 537.221269296741,
height: 357.5300171526586,
showIframe: true,
adaptation: svgs[74],
configValues: { palette: ["#013773", "#00ffac"], angle: 0 },
position: { left: 546.483704974271, top: -37.049742710120064 },
id: 406,
rotation: 180
}
]
}
},
// 140
{
...linearGradient,
thumb: "/thumbs/140.png",
textColor: "#fff",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#370300", "#ed4737"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 248.23327615780443,
height: 416.80960548885076,
showIframe: true,
adaptation: svgs[78],
configValues: { palette: ["#fbda00", "#ed4737"], angle: 0 },
position: { left: 689.1252144082332, top: -24.082332761578044 },
id: 203,
rotation: 0
},
{
type: "object",
width: 537.221269296741,
height: 363.08747855917665,
showIframe: true,
adaptation: svgs[73],
configValues: { palette: ["#ed4737", "#fbda00"], angle: 0 },
position: { left: -7.409948542024013, top: 731.7324185248713 },
id: 502,
rotation: 0
},
{
type: "object",
width: 227.8559176672384,
height: 463.12178387650084,
showIframe: true,
adaptation: svgs[68],
configValues: { palette: ["#fbda00", "#fbda00"], angle: 0 },
position: { left: 224.1509433962264, top: 707.6500857632933 },
id: 503,
rotation: 0
},
{
type: "object",
width: 398.2847341337907,
height: 364.93996569468266,
showIframe: true,
adaptation: svgs[76],
configValues: { palette: ["#fbda00", "#ed4737"], angle: 0 },
position: { left: -11.114922813036019, top: -25.934819897084047 },
id: 504,
rotation: 0
},
{
type: "object",
width: 198.21612349914236,
height: 407.5471698113207,
showIframe: true,
adaptation: svgs[72],
configValues: { palette: ["#ed4737", "#fbda00"], angle: 0 },
position: { left: 500.17152658662087, top: 679.8627787307032 },
id: 505,
rotation: 0
},
{
type: "object",
width: 248.23327615780443,
height: 353.82504288164665,
showIframe: true,
adaptation: svgs[77],
configValues: { palette: ["#ed4737", "#fbda00"], angle: 0 },
position: { left: 292.6929674099485, top: 22.229845626072038 },
id: 507,
rotation: 180
},
{
type: "object",
width: 248.23327615780443,
height: 372.34991423670664,
showIframe: true,
adaptation: svgs[78],
configValues: { palette: ["#fbda00", "#ed4737"], angle: 0 },
position: { left: 146.34648370497425, top: -40.75471698113207 },
id: 508,
rotation: 0
},
{
type: "object",
width: 381.6123499142367,
height: 394.5797598627787,
showIframe: true,
adaptation: svgs[79],
configValues: { palette: ["#ed4737", "#fbda00"], angle: 0 },
position: { left: 724.3224699828473, top: 731.7324185248713 },
id: 510,
rotation: 0
},
{
type: "object",
width: 227.8559176672384,
height: 463.12178387650084,
showIframe: true,
adaptation: svgs[68],
configValues: { palette: ["#ed4737", "#fbda00"], angle: 0 },
position: { left: 655.7804459691251, top: 722.4699828473413 },
id: 302,
rotation: 0
},
{
type: "object",
width: 248.23327615780443,
height: 372.34991423670664,
showIframe: true,
adaptation: svgs[78],
configValues: { palette: ["#fbda00", "#ed4737"], angle: 0 },
position: { left: 433.48198970840474, top: -20.377358490566035 },
id: 202,
rotation: 0
},
{
type: "object",
width: 537.221269296741,
height: 357.5300171526586,
showIframe: true,
adaptation: svgs[74],
configValues: { palette: ["#ed4737", "#fbda00"], angle: 0 },
position: { left: 546.483704974271, top: -37.049742710120064 },
id: 506,
rotation: 180
}
]
}
},
// 141
{
...linearGradient,
thumb: "/thumbs/141.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ffffff", "#ffffff"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 248.23327615780443,
height: 416.80960548885076,
showIframe: true,
adaptation: svgs[78],
configValues: { palette: ["#fbda00", "#ed4737"], angle: 0 },
position: { left: 689.1252144082332, top: -24.082332761578044 },
id: 303,
rotation: 0
},
{
type: "object",
width: 537.221269296741,
height: 363.08747855917665,
showIframe: true,
adaptation: svgs[73],
configValues: { palette: ["#ffad96", "#eb1e80"], angle: 0 },
position: { left: -7.409948542024013, top: 731.7324185248713 },
id: 602,
rotation: 0
},
{
type: "object",
width: 227.8559176672384,
height: 463.12178387650084,
showIframe: true,
adaptation: svgs[68],
configValues: { palette: ["#fbda00", "#fbda00"], angle: 0 },
position: { left: 224.1509433962264, top: 707.6500857632933 },
id: 603,
rotation: 0
},
{
type: "object",
width: 398.2847341337907,
height: 364.93996569468266,
showIframe: true,
adaptation: svgs[76],
configValues: { palette: ["#FFECD2", "#FCB69F"], angle: 0 },
position: { left: -11.114922813036019, top: -25.934819897084047 },
id: 604,
rotation: 0
},
{
type: "object",
width: 198.21612349914236,
height: 407.5471698113207,
showIframe: true,
adaptation: svgs[72],
configValues: { palette: ["#fbfa00", "#98e5d9"], angle: 0 },
position: { left: 500.17152658662087, top: 679.8627787307032 },
id: 605,
rotation: 0
},
{
type: "object",
width: 248.23327615780443,
height: 353.82504288164665,
showIframe: true,
adaptation: svgs[77],
configValues: { palette: ["#f03358", "#6d107e"], angle: 0 },
position: { left: 292.6929674099485, top: -40.75471698113207 },
id: 607,
rotation: 180
},
{
type: "object",
width: 248.23327615780443,
height: 372.34991423670664,
showIframe: true,
adaptation: svgs[78],
configValues: { palette: ["#780206", "#061161"], angle: 0 },
position: { left: 146.34648370497425, top: -92.62435677530016 },
id: 608,
rotation: 0
},
{
type: "object",
width: 381.6123499142367,
height: 394.5797598627787,
showIframe: true,
adaptation: svgs[79],
configValues: { palette: ["#6d107e", "#f03358"], angle: 0 },
position: { left: 724.3224699828473, top: 731.7324185248713 },
id: 610,
rotation: 0
},
{
type: "object",
width: 227.8559176672384,
height: 463.12178387650084,
showIframe: true,
adaptation: svgs[68],
configValues: { palette: ["#FBC2EB", "#A18CD1"], angle: 0 },
position: { left: 655.7804459691251, top: 722.4699828473413 },
id: 402,
rotation: 0
},
{
type: "object",
width: 248.23327615780443,
height: 372.34991423670664,
showIframe: true,
adaptation: svgs[78],
configValues: { palette: ["#fbda00", "#ed4737"], angle: 0 },
position: { left: 433.48198970840474, top: -20.377358490566035 },
id: 302,
rotation: 0
},
{
type: "object",
width: 537.221269296741,
height: 276.02058319039446,
showIframe: true,
adaptation: svgs[74],
configValues: { palette: ["#00ffac", "#003369"], angle: 0 },
position: { left: 594.6483704974271, top: -74.09948542024013 },
id: 606,
rotation: 180
}
]
}
},
// 142
{
...linearGradient,
defaultLayout: 0,
thumb: "/thumbs/142.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#ffb347", "#ffcc33"],
direction: "top",
angle: 200
},
insertedItems: [
{
type: "object",
width: 991.4236706689537,
height: 991.4236706689537,
showIframe: true,
adaptation: svgs[143],
configValues: { color: "#ffffff" },
position: { left: 5.145797598627787, top: 5.145797598627787 },
id: 202,
rotation: 0
}
]
}
},
// 143
{
...linearGradient,
id: 143,
defaultLayout: 2,
thumb: "/thumbs/143.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#feded5", "#c5f0f8"],
direction: "top",
angle: 200
},
insertedItems: [
{
type: "object",
width: 991.4236706689537,
height: 991.4236706689537,
showIframe: true,
adaptation: svgs[143],
configValues: { color: "#ffffff" },
position: { left: 5.145797598627787, top: 5.145797598627787 },
id: 202,
rotation: 0
}
]
}
},
// 144
{
...linearGradient,
defaultLayout: 0,
thumb: "/thumbs/144.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#ffafcc", "#fdebde"],
direction: "right",
angle: 200
},
insertedItems: [
{
type: "object",
width: 1466.5523156089196,
height: 1310.4631217838767,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#9ebaf9", "#9ebaf9"], angle: 0 },
position: { left: 355.06003430531734, top: -576.3293310463122 },
id: 102,
rotation: 0
},
{
type: "object",
width: 831.9039451114924,
height: 641.5094339622642,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#fdebde", "#fdebde"], angle: 0 },
position: { left: 61.749571183533455, top: -373.92795883361924 },
id: 103,
rotation: 0
},
{
type: "object",
width: 991.4236706689537,
height: 991.4236706689537,
showIframe: true,
adaptation: svgs[143],
configValues: { color: "#ffffff" },
position: { left: 5.145797598627787, top: 5.145797598627787 },
id: 302,
rotation: 0
}
]
}
},
// 145
{
...linearGradient,
thumb: "/thumbs/145.png",
textColor: "#ffffff",
defaultLayout: 3,
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#7216a1", "#a0f8d8"],
direction: "right",
angle: 200
},
insertedItems: [
{
type: "object",
width: 1466.5523156089196,
height: 1310.4631217838767,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#5c9cff", "#5c9cff"], angle: 0 },
position: { left: 355.06003430531734, top: -576.3293310463122 },
id: 202,
rotation: 0
},
{
type: "object",
width: 1246.998284734134,
height: 1080.6174957118353,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffffff", "#ffffff"], angle: 0 },
position: { left: 778.7307032590052, top: -255.57461406518013 },
id: 102,
rotation: 0
},
{
type: "object",
width: 1183.5334476843911,
height: 773.5849056603774,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#7216a1", "#7216a1"], angle: 0 },
position: { left: -183.5334476843911, top: -469.98284734133796 },
id: 203,
rotation: 0
},
{
type: "object",
width: 1457.975986277873,
height: 1391.080617495712,
showIframe: true,
adaptation: svgs[143],
configValues: { color: "#7216a1" },
position: { left: -711.835334476844, top: -658.6620926243568 },
id: 402,
rotation: 0
}
]
}
},
// 146
{
...linearGradient,
textColor: "#fff",
defaultLayout: 4,
thumb: "/thumbs/146.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#484ea6", "#ffd800"],
direction: "right",
angle: 200
},
insertedItems: [
{
type: "object",
width: 1466.5523156089196,
height: 1310.4631217838767,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#033360", "#033360"], angle: 0 },
position: { left: 355.06003430531734, top: -576.3293310463122 },
id: 302,
rotation: 0
},
{
type: "object",
width: 1246.998284734134,
height: 1080.6174957118353,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffffff", "#ffffff"], angle: 0 },
position: { left: 778.7307032590052, top: -255.57461406518013 },
id: 202,
rotation: 0
},
{
type: "object",
width: 1183.5334476843911,
height: 773.5849056603774,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#606397", "#606397"], angle: 0 },
position: { left: -183.5334476843911, top: -469.98284734133796 },
id: 303,
rotation: 0
},
{
type: "object",
width: 715.2658662092625,
height: 591.7667238421956,
showIframe: true,
adaptation: svgs[143],
configValues: { color: "#ffffff" },
position: { left: 535.1629502572899, top: 670.6689536878216 },
id: 502,
rotation: 0
},
{
type: "object",
width: 1111.492281303602,
height: 1039.451114922813,
showIframe: true,
adaptation: svgs[143],
configValues: { color: "#ffffff" },
position: { left: -72.04116638078902, top: -725.5574614065181 },
id: 102,
rotation: 0
}
]
}
},
// 147
{
...linearGradient,
thumb: "/thumbs/147.png",
defaultLayout: 2,
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#ffffff", "#e8e8e8"],
direction: "right",
angle: 200
},
insertedItems: [
{
type: "object",
width: 1465.1898734177214,
height: 1310.126582278481,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#c9ff8a", "#c9ff8a"], angle: 0 },
position: { left: 353.6392405063291, top: -575.9493670886076 },
id: 402,
rotation: 0
},
{
type: "object",
width: 1246.8354430379748,
height: 1079.113924050633,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#ffff", "#ffffff"], angle: 0 },
position: { left: -288.7658227848101, top: 156.64556962025316 },
id: 302,
rotation: 0
},
{
type: "object",
width: 1131.3291139240507,
height: 1056.9620253164558,
showIframe: true,
adaptation: svgs[143],
configValues: { color: "#000000" },
position: { left: 361.5506329113924, top: 694.620253164557 },
id: 602,
rotation: 0
},
{
type: "object",
width: 1131.3291139240507,
height: 1056.9620253164558,
showIframe: true,
adaptation: svgs[143],
configValues: { color: "#000000" },
position: { left: -469.1455696202532, top: -712.0253164556962 },
id: 102,
rotation: 0
},
{
type: "object",
width: 1465.1898734177214,
height: 1310.126582278481,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#c9ff8a", "#c9ff8a"], angle: 0 },
position: { left: -866.2974683544304, top: 411.3924050632911 },
id: 103,
rotation: 0
}
]
}
},
// 148
{
...linearGradient,
defaultLayout: 1,
textColor: "#fff",
thumb: "/thumbs/148.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#000000", "#582b00"],
direction: "bottom",
angle: 200
},
insertedItems: [
{
type: "object",
width: 1401.8987341772151,
height: 1276.8987341772151,
showIframe: true,
adaptation: svgs[143],
configValues: { color: "#ed4300" },
position: { left: -198.5759493670886, top: 583.8607594936709 },
id: 302,
rotation: 0
}
]
}
},
// 149
{
...hedgehog,
thumb: "/thumbs/149.png",
defaultLayout: 0,
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
withBackground: true,
backgroundColor: "#105956",
strokeColor: { r: "66", g: "205", b: "166", a: "0.62" },
randomValues: [0.3390192027783483]
},
insertedItems: [
{
id: 303,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oswald",
fontSize: 73,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 249, g: 249, b: 249, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
width: 19.97231012658228,
height: 107.1242088607595,
position: { left: 530.0138449367089, top: 486.4378955696203 },
text: ""
}
]
}
},
// 150
{
...hedgehog,
thumb: "/thumbs/150.png",
defaultLayout: 0,
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
withBackground: true,
backgroundColor: "#212121",
strokeColor: "#ff2232",
randomValues: [0.3390192027783483]
},
insertedItems: [
{
id: 403,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oswald",
fontSize: 73,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 249, g: 249, b: 249, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
width: 19.972126929674097,
height: 107.03902229845625,
position: { left: 530.0139365351629, top: 486.48048885077185 },
text: ""
}
]
}
},
// 151
{
...hedgehog,
thumb: "/thumbs/151.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
withBackground: true,
backgroundColor: "#fdfdfd",
strokeColor: "#22ffd2",
randomValues: [0.3390192027783483]
},
insertedItems: [
{
id: 503,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oswald",
fontSize: 73,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 249, g: 249, b: 249, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
width: 19.972126929674097,
height: 107.03902229845625,
position: { left: 530.0139365351629, top: 486.48048885077185 },
text: ""
}
]
}
},
// 152
{
...hedgehog,
thumb: "/thumbs/152.png",
defaultLayout: 0,
textColor: "#e0aa4f",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
withBackground: true,
backgroundColor: "#e0aa4f",
strokeColor: "#366a8a",
randomValues: [0.3390192027783483]
},
insertedItems: [
{
id: 603,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oswald",
fontSize: 73,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 249, g: 249, b: 249, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
width: 19.972126929674097,
height: 107.03902229845625,
position: { left: 530.0139365351629, top: 486.48048885077185 },
text: ""
}
]
}
},
// 153
{
...hedgehog,
thumb: "/thumbs/153.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
withBackground: true,
backgroundColor: "#bcd4ff",
strokeColor: { r: 255, g: 85, b: 203, a: 0.59 },
randomValues: [0.3390192027783483]
},
insertedItems: [
{
id: 603,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oswald",
fontSize: 73,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 249, g: 249, b: 249, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
width: 19.972126929674097,
height: 107.03902229845625,
position: { left: 530.0139365351629, top: 486.48048885077185 },
text: ""
}
]
}
},
// 154
{
hedgehog,
thumb: "/thumbs/154.png",
defaultLayout: 0,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
withBackground: true,
backgroundColor: "#fdfdfd",
strokeColor: { r: 84, g: 84, b: 84, a: 0.29 },
randomValues: [0.7507029493773505]
},
insertedItems: [
{
id: 603,
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Oswald",
fontSize: 73,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 249, g: 249, b: 249, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
hasCyrillic: true
},
width: 19.97231012658228,
height: 107.1242088607595,
position: { left: 530.0138449367089, top: 486.4378955696203 },
text: ""
}
]
}
},
// 155
{
...linearGradient,
thumb: "/thumbs/155.png",
defaultLayout: 3,
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ff81e5", "#b383ff"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 248.23327615780443,
height: 416.80960548885076,
showIframe: true,
adaptation: svgs[78],
configValues: { palette: ["#8940e4", "#be35ff"], angle: 0 },
position: { left: 689.1252144082332, top: -25.934819897084047 },
id: 303,
rotation: 0
},
{
type: "object",
width: 248.23327615780443,
height: 372.34991423670664,
showIframe: true,
adaptation: svgs[78],
configValues: { palette: ["#8940e4", "#be35ff"], angle: 0 },
position: { left: 146.34648370497425, top: -42.60720411663807 },
id: 608,
rotation: 0
},
{
type: "object",
width: 227.8559176672384,
height: 463.12178387650084,
showIframe: true,
adaptation: svgs[68],
configValues: { palette: ["#be35ff", "#8940e4"], angle: 0 },
position: { left: 490.9090909090909, top: 800.2744425385935 },
id: 402,
rotation: 0
},
{
type: "object",
width: 537.221269296741,
height: 357.5300171526586,
showIframe: true,
adaptation: svgs[74],
configValues: { palette: ["#be35ff", "#8940e4"], angle: 0 },
position: { left: 546.483704974271, top: -38.90222984562607 },
id: 606,
rotation: 180
},
{
type: "object",
width: 398.2847341337907,
height: 364.93996569468266,
showIframe: true,
adaptation: svgs[76],
configValues: { palette: ["#8940e4", "#8940e4"], angle: 0 },
position: { left: -18.524871355060032, top: 40.75471698113207 },
id: 604,
rotation: -89
},
{
type: "object",
width: 227.8559176672384,
height: 463.12178387650084,
showIframe: true,
adaptation: svgs[68],
configValues: { palette: ["#8940e4", "#8940e4"], angle: 0 },
position: { left: -90.77186963979416, top: 548.336192109777 },
id: 603,
rotation: 89
},
{
type: "object",
width: 248.23327615780443,
height: 372.34991423670664,
showIframe: true,
adaptation: svgs[78],
configValues: { palette: ["#8940e4", "#be35ff"], angle: 0 },
position: { left: 424.21955403087475, top: -22.229845626072038 },
id: 302,
rotation: 0
},
{
type: "object",
width: 248.23327615780443,
height: 353.82504288164665,
showIframe: true,
adaptation: svgs[77],
configValues: { palette: ["#8940e4", "#8940e4"], angle: 0 },
position: { left: -62.98456260720411, top: -57.4271012006861 },
id: 607,
rotation: 180
},
{
type: "object",
width: 537.221269296741,
height: 363.08747855917665,
showIframe: true,
adaptation: svgs[73],
configValues: { palette: ["#a155ff", "#7200ff"], angle: 0 },
position: { left: -196.36363636363635, top: 448.3018867924528 },
id: 602,
rotation: 90
},
{
type: "object",
width: 381.6123499142367,
height: 394.5797598627787,
showIframe: true,
adaptation: svgs[79],
configValues: { palette: ["#8940e4", "#8940e4"], angle: 0 },
position: { left: 357.5300171526586, top: 761.3722126929673 },
id: 202,
rotation: 0
},
{
type: "object",
width: 198.21612349914236,
height: 407.5471698113207,
showIframe: true,
adaptation: svgs[72],
configValues: { palette: ["#be35ff", "#8940e4"], angle: 0 },
position: { left: 79.65694682675814, top: 768.7821612349913 },
id: 605,
rotation: 90
},
{
type: "object",
width: 381.6123499142367,
height: 394.5797598627787,
showIframe: true,
adaptation: svgs[79],
configValues: { palette: ["#8940e4", "#8940e4"], angle: 0 },
position: { left: 690.9777015437393, top: 731.7324185248713 },
id: 610,
rotation: 0
},
{
type: "object",
width: 398.2847341337907,
height: 364.93996569468266,
showIframe: true,
adaptation: svgs[76],
configValues: { palette: ["#8940e4", "#8940e4"], angle: 0 },
position: { left: 837.3241852487134, top: 609.4682675814751 },
id: 203,
rotation: 89
}
]
}
},
// 156
{
...linearGradient,
defaultLayout: 0,
textColor: "#f6a2ac",
thumb: "/thumbs/156.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#c6dbd5", "#c6dbd5"],
direction: "top",
angle: 200
},
insertedItems: [
{
type: "object",
width: 230.20706455542023,
height: 82.87454323995128,
showIframe: true,
adaptation: pngs[28],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 13.812423873325214, top: 939.2448233861145 },
id: 210,
rotation: 0
},
{
type: "object",
width: 214.42143727161996,
height: 57.880633373934224,
showIframe: true,
adaptation: pngs[29],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 279.537149817296, top: 970.816077953715 },
id: 211,
rotation: 0
},
{
type: "object",
width: 80.24360535931791,
height: 61.82704019488429,
showIframe: true,
adaptation: pngs[31],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 488.6967113276492, top: 815.590742996346 },
id: 212,
rotation: 0
},
{
type: "object",
width: 178.90377588306941,
height: 189.42752740560292,
showIframe: true,
adaptation: pngs[25],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 876.7600487210718, top: 853.7393422655298 },
id: 215
},
{
type: "object",
width: 152.59439707673567,
height: 190.7429963459196,
showIframe: true,
adaptation: pngs[24],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 701.8026796589525, top: 780.0730816077954 },
id: 214,
rotation: 0
},
{
type: "object",
width: 202.5822168087698,
height: 94.71376370280146,
showIframe: true,
adaptation: pngs[23],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 739.9512789281364, top: 698.5140073081608 },
id: 213,
rotation: 0
},
{
type: "object",
width: 178.90377588306941,
height: 90.7673568818514,
showIframe: true,
adaptation: pngs[17],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 96.6869671132765, top: 78.92813641900122 },
id: 203,
rotation: 0
},
{
type: "object",
width: 101.2911084043849,
height: 57.880633373934224,
showIframe: true,
adaptation: pngs[27],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 841.2423873325213, top: 60.5115712545676 },
id: 204,
rotation: 0
},
{
type: "object",
width: 328.86723507917173,
height: 101.2911084043849,
showIframe: true,
adaptation: pngs[16],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 536.0535931790499, top: 65.77344701583435 },
id: 205,
rotation: 0
},
{
type: "object",
width: 80.24360535931791,
height: 47.35688185140073,
showIframe: true,
adaptation: pngs[26],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 61.169305724725945, top: 762.9719853836784 },
id: 220,
rotation: 0
},
{
type: "object",
width: 74.98172959805116,
height: 32.886723507917175,
showIframe: true,
adaptation: pngs[32],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 920.1705237515225, top: 349.91473812423874 },
id: 221,
rotation: 0
},
{
type: "object",
width: 124.96954933008526,
height: 53.934226552984164,
showIframe: true,
adaptation: pngs[20],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 971.4738124238734, top: 402.5334957369062 },
id: 219,
rotation: 0
},
{
type: "object",
width: 267.0401948842875,
height: 117.07673568818514,
showIframe: true,
adaptation: pngs[26],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 98.00243605359317, top: 691.9366626065773 },
id: 208,
rotation: -11
},
{
type: "object",
width: 86.82095006090134,
height: 39.46406820950061,
showIframe: true,
adaptation: pngs[27],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 321.63215590743, top: 707.7222898903776 },
id: 209,
rotation: 0
},
{
type: "object",
width: 257.83191230207063,
height: 117.07673568818514,
showIframe: true,
adaptation: pngs[18],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 69.06211936662606, top: 239.41534713763704 },
id: 206,
rotation: 0
},
{
type: "object",
width: 144.70158343483556,
height: 64.45797807551766,
showIframe: true,
adaptation: pngs[19],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 351.8879415347138, top: 267.0401948842875 },
id: 207,
rotation: 0
},
{
type: "object",
width: 248.62362971985382,
height: 97.34470158343484,
showIframe: true,
adaptation: pngs[22],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 642.6065773447016, top: 267.0401948842875 },
id: 217,
rotation: 0
}
]
}
},
// 157
{
...linearGradient,
defaultLayout: 7,
thumb: "/thumbs/157.png",
layoutThumb: "/thumbs/157L.png",
textColor: "#5c6e7b",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#f4fffb", "#c6dbd5"],
direction: "top",
angle: 200
},
insertedItems: [
{
type: "object",
width: 86.82095006090134,
height: 39.46406820950061,
showIframe: true,
adaptation: pngs[27],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 299.2691839220463, top: 707.7222898903776 },
id: 209,
rotation: 0
},
{
type: "object",
width: 230.20706455542023,
height: 82.87454323995128,
showIframe: true,
adaptation: pngs[28],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 13.812423873325214, top: 939.2448233861145 },
id: 210,
rotation: 0
},
{
type: "object",
width: 214.42143727161996,
height: 57.880633373934224,
showIframe: true,
adaptation: pngs[29],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 279.537149817296, top: 970.816077953715 },
id: 211,
rotation: 0
},
{
type: "object",
width: 80.24360535931791,
height: 61.82704019488429,
showIframe: true,
adaptation: pngs[31],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 488.6967113276492, top: 815.590742996346 },
id: 212,
rotation: 0
},
{
type: "object",
width: 178.90377588306941,
height: 189.42752740560292,
showIframe: true,
adaptation: pngs[25],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 876.7600487210718, top: 853.7393422655298 },
id: 215
},
{
type: "object",
width: 152.59439707673567,
height: 190.7429963459196,
showIframe: true,
adaptation: pngs[24],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 701.8026796589525, top: 780.0730816077954 },
id: 214,
rotation: 0
},
{
type: "object",
width: 202.5822168087698,
height: 94.71376370280146,
showIframe: true,
adaptation: pngs[23],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 739.9512789281364, top: 698.5140073081608 },
id: 213,
rotation: 0
},
{
type: "object",
width: 178.90377588306941,
height: 90.7673568818514,
showIframe: true,
adaptation: pngs[17],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 96.6869671132765, top: 78.92813641900122 },
id: 203,
rotation: 0
},
{
type: "object",
width: 101.2911084043849,
height: 57.880633373934224,
showIframe: true,
adaptation: pngs[27],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 841.2423873325213, top: 60.5115712545676 },
id: 204,
rotation: 0
},
{
type: "object",
width: 328.86723507917173,
height: 101.2911084043849,
showIframe: true,
adaptation: pngs[16],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 536.0535931790499, top: 65.77344701583435 },
id: 205,
rotation: 0
},
{
type: "object",
width: 80.24360535931791,
height: 47.35688185140073,
showIframe: true,
adaptation: pngs[26],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 50.64555420219245, top: 837.9537149817296 },
id: 220,
rotation: 0
},
{
type: "object",
width: 267.0401948842875,
height: 117.07673568818514,
showIframe: true,
adaptation: pngs[26],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 87.47868453105968, top: 691.9366626065773 },
id: 208,
rotation: 0
},
{
type: "object",
width: 124.96954933008526,
height: 53.934226552984164,
showIframe: true,
adaptation: pngs[20],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 883.3373934226553, top: 349.91473812423874 },
id: 219,
rotation: 0
},
{
type: "object",
width: 74.98172959805116,
height: 32.886723507917175,
showIframe: true,
adaptation: pngs[32],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 954.3727161997564, top: 428.84287454323993 },
id: 221,
rotation: 0
},
{
type: "object",
width: 248.62362971985382,
height: 97.34470158343484,
showIframe: true,
adaptation: pngs[22],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 637.3447015834348, top: 255.20097442143728 },
id: 217,
rotation: 0
},
{
type: "object",
width: 173.64190012180268,
height: 78.92813641900122,
showIframe: true,
adaptation: pngs[18],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 265.06699147381244, top: 306.50426309378804 },
id: 206,
rotation: 0
},
{
type: "object",
width: 144.70158343483556,
height: 64.45797807551766,
showIframe: true,
adaptation: pngs[19],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 99.31790499390986, top: 270.9866017052375 },
id: 207,
rotation: 0
}
]
}
},
// 158
{
...linearGradient,
thumb: "/thumbs/158.png",
layoutThumb: "/thumbs/158L.png",
defaultLayout: 8,
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ffffff", "#ffffff"],
direction: "top",
angle: 200
},
insertedItems: [
{
type: "object",
width: 230.20706455542023,
height: 82.87454323995128,
showIframe: true,
adaptation: pngs[28],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 13.812423873325214, top: 939.2448233861145 },
id: 310,
rotation: 0
},
{
type: "object",
width: 214.42143727161996,
height: 57.880633373934224,
showIframe: true,
adaptation: pngs[29],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 279.537149817296, top: 970.816077953715 },
id: 311,
rotation: 0
},
{
type: "object",
width: 178.90377588306941,
height: 90.7673568818514,
showIframe: true,
adaptation: pngs[17],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 162.46041412911083, top: 156.54080389768575 },
id: 303,
rotation: 0
},
{
type: "object",
width: 101.2911084043849,
height: 57.880633373934224,
showIframe: true,
adaptation: pngs[27],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 513.6906211936663, top: 76.29719853836784 },
id: 304,
rotation: 0
},
{
type: "object",
width: 144.70158343483556,
height: 64.45797807551766,
showIframe: true,
adaptation: pngs[19],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 230.86479902557855, top: 207.84409257003654 },
id: 307,
rotation: 0
},
{
type: "object",
width: 267.0401948842875,
height: 117.07673568818514,
showIframe: true,
adaptation: pngs[26],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 333.47137637028015, top: 106.55298416565165 },
id: 308,
rotation: 0
},
{
type: "object",
width: 328.86723507917173,
height: 101.2911084043849,
showIframe: true,
adaptation: pngs[16],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 555.7856272838003, top: 130.231425091352 },
id: 305,
rotation: 0
},
{
type: "object",
width: 74.98172959805116,
height: 32.886723507917175,
showIframe: true,
adaptation: pngs[32],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 795.2009744214373, top: 234.15347137637028 },
id: 321,
rotation: 0
},
{
type: "object",
width: 173.64190012180268,
height: 78.92813641900122,
showIframe: true,
adaptation: pngs[27],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 365.04263093788063, top: 234.15347137637028 },
id: 306,
rotation: 0
},
{
type: "object",
width: 248.62362971985382,
height: 97.34470158343484,
showIframe: true,
adaptation: pngs[22],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 554.4701583434836, top: 218.36784409257004 },
id: 317,
rotation: 0
},
{
type: "object",
width: 124.96954933008526,
height: 53.934226552984164,
showIframe: true,
adaptation: pngs[20],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 542.6309378806334, top: 289.4031668696711 },
id: 319,
rotation: 184
},
{
type: "object",
width: 80.24360535931791,
height: 47.35688185140073,
showIframe: true,
adaptation: pngs[26],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 138.78197320341047, top: 828.7454323995128 },
id: 320,
rotation: 0
},
{
type: "object",
width: 86.82095006090134,
height: 39.46406820950061,
showIframe: true,
adaptation: pngs[27],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 297.9537149817296, top: 798.489646772229 },
id: 309,
rotation: 0
},
{
type: "object",
width: 169.69549330085263,
height: 55.249695493300855,
showIframe: true,
adaptation: pngs[29],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 265.06699147381244, top: 889.2570036540803 },
id: 102,
rotation: 0
},
{
type: "object",
width: 80.24360535931791,
height: 61.82704019488429,
showIframe: true,
adaptation: pngs[31],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 474.22655298416566, top: 878.7332521315469 },
id: 312,
rotation: 0
},
{
type: "object",
width: 152.59439707673567,
height: 190.7429963459196,
showIframe: true,
adaptation: pngs[24],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 582.095006090134, top: 880.0487210718636 },
id: 314,
rotation: 0
},
{
type: "object",
width: 202.5822168087698,
height: 94.71376370280146,
showIframe: true,
adaptation: pngs[23],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 633.3982947624847, top: 845.8465286236298 },
id: 313,
rotation: 0
},
{
type: "object",
width: 178.90377588306941,
height: 189.42752740560292,
showIframe: true,
adaptation: pngs[25],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 872.8136419001218, top: 756.394640682095 },
id: 315,
rotation: 313
}
]
}
},
// 159
{
...linearGradient,
thumb: "/thumbs/159.png",
defaultLayout: 2,
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#d57eeb", "#fccb90"],
direction: "top",
angle: 200
},
insertedItems: [
{
type: "object",
width: 86.82095006090134,
height: 39.46406820950061,
showIframe: true,
adaptation: pngs[27],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 299.2691839220463, top: 707.7222898903776 },
id: 309,
rotation: 0
},
{
type: "object",
width: 230.20706455542023,
height: 82.87454323995128,
showIframe: true,
adaptation: pngs[28],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 13.812423873325214, top: 939.2448233861145 },
id: 310,
rotation: 0
},
{
type: "object",
width: 80.24360535931791,
height: 61.82704019488429,
showIframe: true,
adaptation: pngs[31],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 488.6967113276492, top: 815.590742996346 },
id: 312,
rotation: 0
},
{
type: "object",
width: 178.90377588306941,
height: 189.42752740560292,
showIframe: true,
adaptation: pngs[25],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 876.7600487210718, top: 853.7393422655298 },
id: 315
},
{
type: "object",
width: 202.5822168087698,
height: 94.71376370280146,
showIframe: true,
adaptation: pngs[23],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 739.9512789281364, top: 698.5140073081608 },
id: 313,
rotation: 0
},
{
type: "object",
width: 101.2911084043849,
height: 57.880633373934224,
showIframe: true,
adaptation: pngs[27],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 841.2423873325213, top: 60.5115712545676 },
id: 304,
rotation: 0
},
{
type: "object",
width: 80.24360535931791,
height: 47.35688185140073,
showIframe: true,
adaptation: pngs[26],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 50.64555420219245, top: 837.9537149817296 },
id: 320,
rotation: 0
},
{
type: "object",
width: 124.96954933008526,
height: 53.934226552984164,
showIframe: true,
adaptation: pngs[20],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 883.3373934226553, top: 349.91473812423874 },
id: 319,
rotation: 0
},
{
type: "object",
width: 74.98172959805116,
height: 32.886723507917175,
showIframe: true,
adaptation: pngs[32],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 954.3727161997564, top: 428.84287454323993 },
id: 321,
rotation: 0
},
{
type: "object",
width: 144.70158343483556,
height: 64.45797807551766,
showIframe: true,
adaptation: pngs[19],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 99.31790499390986, top: 270.9866017052375 },
id: 307,
rotation: 0
},
{
type: "object",
width: 178.90377588306941,
height: 90.7673568818514,
showIframe: true,
adaptation: pngs[17],
configValues: {
hue: 0,
saturate: 100,
brightness: 123,
contrast: 95
},
position: { left: 96.6869671132765, top: 78.92813641900122 },
id: 303,
rotation: 0
},
{
type: "object",
width: 328.86723507917173,
height: 101.2911084043849,
showIframe: true,
adaptation: pngs[16],
configValues: {
hue: 0,
saturate: 100,
brightness: 145,
contrast: 100
},
position: { left: 536.0535931790499, top: 65.77344701583435 },
id: 305,
rotation: 0
},
{
type: "object",
width: 173.64190012180268,
height: 78.92813641900122,
showIframe: true,
adaptation: pngs[18],
configValues: {
hue: 0,
saturate: 100,
brightness: 143,
contrast: 100
},
position: { left: 265.06699147381244, top: 305.18879415347135 },
id: 306,
rotation: 0
},
{
type: "object",
width: 248.62362971985382,
height: 97.34470158343484,
showIframe: true,
adaptation: pngs[22],
configValues: {
hue: 0,
saturate: 100,
brightness: 110,
contrast: 100
},
position: { left: 637.3447015834348, top: 255.20097442143728 },
id: 317,
rotation: 0
},
{
type: "object",
width: 267.0401948842875,
height: 117.07673568818514,
showIframe: true,
adaptation: pngs[26],
configValues: {
hue: 0,
saturate: 100,
brightness: 133,
contrast: 100
},
position: { left: 87.47868453105968, top: 691.9366626065773 },
id: 308,
rotation: 0
},
{
type: "object",
width: 152.59439707673567,
height: 190.7429963459196,
showIframe: true,
adaptation: pngs[24],
configValues: {
hue: 0,
saturate: 100,
brightness: 135,
contrast: 100
},
position: { left: 701.8026796589525, top: 780.0730816077954 },
id: 314,
rotation: 0
},
{
type: "object",
width: 214.42143727161996,
height: 57.880633373934224,
showIframe: true,
adaptation: pngs[29],
configValues: {
hue: 0,
saturate: 100,
brightness: 128,
contrast: 100
},
position: { left: 279.537149817296, top: 970.816077953715 },
id: 311,
rotation: 0
}
]
}
},
// 160
{
...linearGradient,
defaultLayout: 9,
thumb: "/thumbs/160.png",
layoutThumb: "/thumbs/160L.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#fceff6", "#ecf1fe"],
direction: "top",
angle: 200
},
insertedItems: [
{
type: "object",
width: 251.20253164556965,
height: 102.53164556962027,
showIframe: true,
adaptation: pngs[28],
configValues: {
hue: 281,
saturate: 171,
brightness: 100,
contrast: 100
},
position: { left: 496.4240506329114, top: 131.58227848101268 },
id: 103,
rotation: 0
},
{
type: "object",
width: 158.92405063291142,
height: 58.10126582278482,
showIframe: true,
adaptation: pngs[16],
configValues: {
hue: 191,
saturate: 195,
brightness: 100,
contrast: 100
},
position: { left: 498.1329113924051, top: 437.4683544303798 },
id: 102,
rotation: 0
},
{
type: "object",
width: 345.18987341772157,
height: 93.98734177215191,
showIframe: true,
adaptation: pngs[29],
configValues: {
hue: 56,
saturate: 168,
brightness: 100,
contrast: 100
},
position: { left: 88.00632911392405, top: 220.44303797468356 },
id: 105,
rotation: 0
},
{
type: "object",
width: 111.07594936708861,
height: 90.56962025316456,
showIframe: true,
adaptation: pngs[16],
configValues: {
hue: 261,
saturate: 215,
brightness: 100,
contrast: 100
},
position: { left: 352.8797468354431, top: 440.8860759493671 },
id: 111,
rotation: 0
},
{
type: "object",
width: 196.51898734177217,
height: 92.27848101265823,
showIframe: true,
adaptation: pngs[30],
configValues: {
hue: 216,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 74.33544303797468, top: 449.43037974683546 },
id: 109,
rotation: 0
},
{
type: "object",
width: 182.8481012658228,
height: 71.77215189873418,
showIframe: true,
adaptation: pngs[26],
configValues: {
hue: 0,
saturate: 236,
brightness: 100,
contrast: 100
},
position: { left: 501.5506329113924, top: 309.30379746835445 },
id: 104,
rotation: 0
},
{
type: "object",
width: 177.7215189873418,
height: 97.40506329113924,
showIframe: true,
adaptation: pngs[31],
configValues: {
hue: 0,
saturate: 179,
brightness: 100,
contrast: 100
},
position: { left: 270.8544303797469, top: 302.46835443037975 },
id: 108,
rotation: 0
},
{
type: "object",
width: 158.92405063291142,
height: 123.03797468354432,
showIframe: true,
adaptation: pngs[21],
configValues: {
hue: 0,
saturate: 100,
brightness: 100,
contrast: 100
},
position: { left: 687.8164556962026, top: 220.44303797468356 },
id: 106,
rotation: 376
},
{
type: "object",
width: 329.8101265822785,
height: 305.8860759493671,
showIframe: true,
adaptation: pngs[25],
configValues: {
hue: 38,
saturate: 147,
brightness: 100,
contrast: 100
},
position: { left: 710.0316455696203, top: 471.6455696202532 },
id: 107,
rotation: 0
}
]
}
},
// 161
{
...linearGradient,
layoutThumb: "/thumbs/161L.png",
initState: {
size: { width: 1000, height: 1000 },
configValues: {
palette: ["#00e8f7", "#c700d2"],
direction: "bottom",
angle: 200
},
insertedItems: [
{
type: "object",
width: 305.3173241852487,
height: 219.5540308747856,
showIframe: true,
adaptation: svgs[24],
configValues: { palette: ["#71FFF5", "#BFFF86"], angle: 0 },
position: { left: 325.9005145797599, top: 689.5368782161236 },
id: 105,
rotation: 0
},
{
type: "text",
layoutItemType: "header",
hasCyrillic: false,
configValues: {
fontFamily: "Rubik Mono One",
fontSize: 71,
padding: 10,
letterSpacing: 0,
color: "#eefd00",
borderWidth: 0,
isInline: false,
lineHeight: 12,
textAlign: "center",
isBold: false
},
id: 1302,
text: "Sample header\ntext goes here",
width: 864.8424099485421,
height: 188.08962264150944,
position: { left: 68.82504288164667, top: 245.87264150943398 }
},
{
type: "object",
width: 181.81818181818184,
height: 185.24871355060034,
showIframe: true,
adaptation: svgs[122],
configValues: { palette: ["#fbfa00", "#98e5d9"], angle: 0 },
position: { left: 307.032590051458, top: 718.696397941681 },
id: 103,
rotation: 0
},
{
type: "object",
width: 197.25557461406518,
height: 255.57461406518013,
showIframe: true,
adaptation: svgs[123],
configValues: { palette: ["#96FBC4", "#F9F586"], angle: 0 },
position: { left: 449.3996569468268, top: 672.3842195540309 },
id: 104,
rotation: 8
},
{
type: "text",
layoutItemType: "subheader-multiline",
hasCyrillic: false,
configValues: {
fontFamily: "Noto Sans",
fontSize: 43,
padding: 10,
letterSpacing: 0,
color: "#fff",
borderWidth: 0,
isInline: false,
lineHeight: 12,
textAlign: "center",
isBold: true,
hasCyrillic: true
},
id: 403,
position: { left: 184.0694682675815, top: 478.55917667238424 },
text: "sample text subheading below",
width: 637.9716981132076,
height: 71.45154373927959
}
]
}
},
// 162
{
...linearGradient,
thumb: "/thumbs/162.png",
layoutThumb: "/thumbs/162L.png",
defaultLayout: 9,
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#bf1f00", "#3d0000"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
id: 400,
type: "object",
showIframe: true,
adaptation: gradientWaves,
width: 1083.704974271012,
height: 1081.852487135506,
position: { left: -3.7049742710120066, top: -3.7049742710120066 },
configValues: {
amplituteX: 60,
amplituteY: 60,
fill: false,
lines: 10,
palette: ["#e9db6d", "#c95c46"],
randomValues: [0.1329382981666447, 0.5229732095475299],
smoothness: 10,
fontSize: null
},
rotation: 0
},
{
type: "object",
width: 1624.6312178387648,
height: 1402.3327615780445,
showIframe: true,
adaptation: svgs[140],
configValues: { palette: ["#3d0000", "#3d0000"], angle: 0 },
position: { left: -542.7787307032589, top: 314.92281303602056 },
id: 103,
rotation: 0
}
]
}
},
// 163
{
...linearGradient,
layoutThumb: "/thumbs/163L.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ffffff", "#ebf1ff"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
type: "object",
width: 351.97255574614064,
height: 327.89022298456257,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#f7fba7", "#25e554"], angle: 0 },
position: { left: 244.52830188679243, top: 113.0017152658662 },
id: 202,
rotation: 0
},
{
type: "object",
width: 351.97255574614064,
height: 327.89022298456257,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#f7fba7", "#25e554"], angle: 0 },
position: { left: 244.52830188679243, top: 113.0017152658662 },
id: 102,
rotation: 0
},
{
type: "object",
width: 216.74099485420237,
height: 307.5128644939965,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#0869eb", "#25e554"], angle: 0 },
position: { left: 505.7289879931389, top: 109.29674099485419 },
id: 203,
rotation: 62
},
{
type: "object",
width: 146.34648370497425,
height: 116.7066895368782,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#25e554", "#0869eb"], angle: 0 },
position: { left: 259.3481989708405, top: 405.6946826758147 },
id: 205,
rotation: 120
},
{
type: "object",
width: 120.4116638078902,
height: 101.88679245283018,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#f7fba7", "#25e554"], angle: 0 },
position: { left: 678.0102915951971, top: 972.5557461406518 },
id: 103,
rotation: 0
},
{
type: "text",
hasCyrillic: false,
configValues: {
fontFamily: "Roboto",
fontSize: 71,
padding: 29,
letterSpacing: 0,
color: "#000",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 14,
isBold: false,
isItalic: false
},
id: 204,
width: 437.2737993138936,
height: 450.6753859348199,
position: { left: 397.184819897084, top: 466.8846483704974 },
text: "SAMPLE\nTEXT\nNEXT TO\nA DRAWING"
},
{
type: "object",
width: 79.65694682675814,
height: 62.98456260720411,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#f7fba7", "#25e554"], angle: 0 },
position: { left: 114.8542024013722, top: 831.7667238421955 },
id: 105,
rotation: 0
},
{
type: "object",
width: 100.03430531732418,
height: 88.91938250428815,
showIframe: true,
adaptation: svgs[11],
configValues: { palette: ["#25e554", "#0869eb"], angle: 0 },
position: { left: 624.2881646655231, top: 968.8507718696397 },
id: 104,
rotation: 53
}
]
}
},
// 164
{
...linearGradient,
thumb: "/thumbs/164.png",
layoutThumb: "/thumbs/164L.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#0b0a21", "#1e1b57"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
id: 201,
type: "object",
showIframe: true,
adaptation: gradientWaves,
width: 1004.0480274442538,
height: 1000.3430531732417,
position: { left: 37.049742710120064, top: 42.60720411663807 },
configValues: {
amplituteX: 88,
amplituteY: 10,
fill: false,
lines: 67,
palette: ["#cf91f9", "#02d0ea"],
randomValues: [0.044420196340127394, 0.22911748347161964],
smoothness: 12,
fontSize: null
},
rotation: 0
},
{
id: 203,
type: "text",
position: { left: 172.25235849056602, top: 323.2590051457976 },
configValues: {
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
color: "#ffffff",
fontFamily: "Monoton",
fontSize: 150,
letterSpacing: 0,
padding: 10,
hasCyrillic: true
},
text: "SAMPLE\nBOLD\nTEXT",
width: 725.219768439108,
height: 514.586192109777
}
]
}
},
// 165
{
...linearGradient,
thumb: "/thumbs/165.png",
defaultLayout: 2,
textColor: "#fff",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#4c5c7e", "#77908b"],
direction: "custom_angle",
angle: 200
},
insertedItems: [
{
id: 301,
type: "object",
showIframe: true,
adaptation: gradientWaves,
width: 1004.0480274442538,
height: 1000.3430531732417,
position: { left: 37.049742710120064, top: 42.60720411663807 },
configValues: {
amplituteX: 64,
amplituteY: 10,
fill: false,
lines: 27,
palette: ["#89b9b9", "#00e2ff"],
randomValues: [],
smoothness: 12,
fontSize: null
},
rotation: 0
}
]
}
},
// 166
{
...linearGradient,
layoutThumb: "/thumbs/166.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#013bd0", "#013bd0"],
direction: "bottom",
angle: 200
},
insertedItems: [
{
type: "object",
width: 957.7358490566037,
height: 646.5180102915951,
showIframe: true,
adaptation: linearGradient,
configValues: {
palette: ["#013bd0", "#2dd8fb"],
direction: "top",
angle: 308
},
position: { left: 135.23156089193824, top: 144.49399656946827 },
id: 202,
rotation: 0
},
{
type: "text",
hasCyrillic: false,
text: "Some sample text \nsample text sample\nsome sample text",
isDraggable: true,
configValues: {
fontFamily: "Roboto Mono",
fontSize: 55,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
isBold: false,
hasCyrillic: true
},
id: 204,
width: 613.8968696397941,
height: 214.48327615780445,
position: { left: 241.74957118353342, top: 751.1835334476843 }
},
{
type: "text",
hasCyrillic: false,
text: "Sample text sample",
isDraggable: true,
configValues: {
fontFamily: "Roboto Mono",
fontSize: 67,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
backgroundColor: { r: 255, g: 255, b: 255, a: 0 },
borderWidth: 0,
isInline: false,
lineHeight: 12,
isBold: true
},
id: 203,
width: 743.5420240137221,
height: 99.62907375643223,
position: { left: 239.89708404802744, top: 593.722126929674 }
}
]
}
},
// 167
{
...trianglify,
thumb: "/thumbs/167.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#ffebeb", "#fc6767", "#0081e7", "#ec008c"],
cell_size: 80,
variance: 100
},
insertedItems: [
{
id: 303,
type: "object",
width: 1072.590051457976,
height: 1074.442538593482,
showIframe: true,
adaptation: voronoi,
configValues: {
palette: ["#ffdaf4", "#fa5a5a", "#ef6034"],
filled: true,
lineWidth: 5,
minMaxRadius: [2, 3]
},
position: { left: 3.7049742710120066, top: 0 },
rotation: 0
}
]
}
},
// 168
{
...linearGradient,
layoutThumb: "/thumbs/168.png",
"initState":{"size":{"width":1080,"height":1080},"configValues":{"palette":["#fdedb2","#fdedb2"],"direction":"bottom","angle":200},"insertedItems":[{"type":"text","layoutItemType":"header","hasCyrillic":false,"configValues":{"fontFamily":"Ubuntu","fontSize":120,"padding":10,"letterSpacing":0,"color":"#d03641","borderWidth":0,"isInline":false,"lineHeight":12,"textAlign":"left","isBold":true},"id":1502,"text":"Designer for \nAesthetic Wisdom \nand Layout","width":1032.2984562607203,"height":447.8966552315608,"position":{"left":39.42324185248713,"top":318.8593481989708}},{"type":"text","layoutItemType":"header","hasCyrillic":false,"configValues":{"fontFamily":"Ubuntu","fontSize":52,"padding":10,"letterSpacing":0,"color":"#d03641","borderWidth":0,"isInline":false,"lineHeight":12,"textAlign":"left","isBold":true},"id":302,"text":"Pseudo Design Titles","width":511.3153945111492,"height":81.1042024013722,"position":{"left":48.68567753001715,"top":72.47855917667238}}]}
},
// 169
{
...linearGradient,
thumb: "/thumbs/169.png",
"initState":{"size":{"width":1080,"height":1080},"configValues":{"palette":["#edb200","#edb200"],"direction":"bottom","angle":200},"insertedItems":[{"type":"text","layoutItemType":"header","hasCyrillic":false,"configValues":{"fontFamily":"Ubuntu","fontSize":120,"padding":10,"letterSpacing":0,"color":"#1a1d1b","borderWidth":0,"isInline":false,"lineHeight":12,"textAlign":"left","isBold":true},"id":1402,"text":"Designer for \nAesthetic Wisdom \nand Layout","width":1032.2984562607203,"height":447.8966552315608,"position":{"left":35.718267581475125,"top":315.15437392795883}},{"type":"text","layoutItemType":"header","hasCyrillic":false,"configValues":{"fontFamily":"Ubuntu","fontSize":52,"padding":10,"letterSpacing":0,"color":"#1a1d1b","borderWidth":0,"isInline":false,"lineHeight":12,"textAlign":"left","isBold":true},"id":202,"text":"Pseudo Design Titles","width":511.3153945111492,"height":81.1042024013722,"position":{"left":44.98070325900514,"top":68.77358490566037}}]}
},
// 170
{
...linearGradient,
thumb: "/thumbs/170.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#13c37a", "#13c37a"],
direction: "bottom",
angle: 200
},
insertedItems: [
{
type: "text",
layoutItemType: "header",
hasCyrillic: false,
configValues: {
fontFamily: "Ubuntu",
fontSize: 120,
padding: 10,
letterSpacing: 0,
color: "#521008",
borderWidth: 0,
isInline: false,
lineHeight: 12,
textAlign: "left",
isBold: true
},
id: 1402,
text: "Designer for \nAesthetic Wisdom \nand Layout",
width: 1032.2984562607203,
height: 447.8966552315608,
position: { left: 35.718267581475125, top: 315.15437392795883 }
},
{
type: "text",
layoutItemType: "header",
hasCyrillic: false,
configValues: {
fontFamily: "Ubuntu",
fontSize: 52,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
borderWidth: 0,
isInline: false,
lineHeight: 12,
textAlign: "left",
isBold: true
},
id: 202,
text: "Pseudo Design Titles",
width: 511.3153945111492,
height: 81.1042024013722,
position: { left: 44.98070325900514, top: 68.77358490566037 }
}
]
}
},
// 171
{
...linearGradient,
thumb: "/thumbs/171.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#fd6649", "#fd6649"],
direction: "bottom",
angle: 200
},
insertedItems: [
{
type: "text",
layoutItemType: "header",
hasCyrillic: false,
configValues: {
fontFamily: "Ubuntu",
fontSize: 120,
padding: 10,
letterSpacing: 0,
color: "#266591",
borderWidth: 0,
isInline: false,
lineHeight: 12,
textAlign: "left",
isBold: true
},
id: 1502,
text: "Designer for \nAesthetic Wisdom \nand Layout",
width: 1032.2984562607203,
height: 447.8966552315608,
position: { left: 39.42324185248713, top: 318.8593481989708 }
},
{
type: "text",
layoutItemType: "header",
hasCyrillic: false,
configValues: {
fontFamily: "Ubuntu",
fontSize: 52,
padding: 10,
letterSpacing: 0,
color: "#ffffff",
borderWidth: 0,
isInline: false,
lineHeight: 12,
textAlign: "left",
isBold: true
},
id: 302,
text: "Pseudo Design Titles",
width: 511.3153945111492,
height: 81.1042024013722,
position: { left: 48.68567753001715, top: 72.47855917667238 }
}
]
}
},
// 172
{
...linearGradient,
thumb: "/thumbs/172.png",
initState: {
size: { width: 1080, height: 1080 },
configValues: {
palette: ["#cd244a", "#cd244a"],
direction: "bottom",
angle: 200
},
insertedItems: [
{
type: "text",
layoutItemType: "header",
hasCyrillic: false,
configValues: {
fontFamily: "Ubuntu",
fontSize: 120,
padding: 10,
letterSpacing: 0,
color: "#eac417",
borderWidth: 0,
isInline: false,
lineHeight: 12,
textAlign: "left",
isBold: true
},
id: 1602,
text: "Designer for \nAesthetic Wisdom \nand Layout",
width: 1032.2984562607203,
height: 447.8966552315608,
position: { left: 43.128216123499136, top: 322.5643224699828 }
},
{
type: "text",
layoutItemType: "header",
hasCyrillic: false,
configValues: {
fontFamily: "Ubuntu",
fontSize: 52,
padding: 10,
letterSpacing: 0,
color: "#eac417",
borderWidth: 0,
isInline: false,
lineHeight: 12,
textAlign: "left",
isBold: true
},
id: 402,
text: "Pseudo Design Titles",
width: 511.3153945111492,
height: 81.1042024013722,
position: { left: 52.39065180102916, top: 76.18353344768438 }
}
]
}
},
// 173
{
...linearGradient,
thumb: "/thumbs/173.png",
"initState":{"size":{"width":1080,"height":1080},"configValues":{"palette":["#27292b","#27292b"],"direction":"bottom","angle":200},"insertedItems":[{"type":"text","layoutItemType":"header","hasCyrillic":false,"configValues":{"fontFamily":"Ubuntu","fontSize":120,"padding":10,"letterSpacing":0,"color":"#a546a7","borderWidth":0,"isInline":false,"lineHeight":12,"textAlign":"left","isBold":true},"id":1502,"text":"Designer for \nAesthetic Wisdom \nand Layout","width":1032.2984562607203,"height":447.8966552315608,"position":{"left":39.42324185248713,"top":318.8593481989708}},{"type":"text","layoutItemType":"header","hasCyrillic":false,"configValues":{"fontFamily":"Ubuntu","fontSize":52,"padding":10,"letterSpacing":0,"color":"#a546a7","borderWidth":0,"isInline":false,"lineHeight":12,"textAlign":"left","isBold":true},"id":302,"text":"Pseudo Design Titles","width":511.3153945111492,"height":81.1042024013722,"position":{"left":48.68567753001715,"top":72.47855917667238}}]}
}
// { ...cells },
// { ...fog },
];
// adaptation: "svgs/(.*)",
// adaptation: svgs[$1],
// png_htmls/32
| 28.295065 | 981 | 0.470844 |
83d651804a1c2ee777195bf97d09c0c7849706a5 | 5,317 | js | JavaScript | src/core/blocks/other/PicksBlock.js | jyk-s-lab/StateOfJS-2020 | 310683cfdb8e21696d5c84f97c71445655fe3ced | [
"MIT"
] | null | null | null | src/core/blocks/other/PicksBlock.js | jyk-s-lab/StateOfJS-2020 | 310683cfdb8e21696d5c84f97c71445655fe3ced | [
"MIT"
] | null | null | null | src/core/blocks/other/PicksBlock.js | jyk-s-lab/StateOfJS-2020 | 310683cfdb8e21696d5c84f97c71445655fe3ced | [
"MIT"
] | null | null | null | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import ReactMarkdown from 'react-markdown'
import { useI18n } from 'core/i18n/i18nContext'
import { mq, spacing, fontSize, color } from 'core/theme'
import picks from 'config/picks.yml'
const PicksBlock = ({ block, data }) => {
const { translate } = useI18n()
const { id } = block
const pick = picks.find((p) => p.twitterName === id)
if (!pick) {
return null
}
const { twitterName, fullName, pickName, avatarUrl, url } = pick
return (
<PicksContainer className="Block">
<PicksIntroMobile>{translate(`picks.intro`)}</PicksIntroMobile>
<div className="pick">
<Pick>
<PickContentWrapper>
<PickContent>
<PickTitle>
<span>{translate(`picks.my_2020_pick`)}</span>
<a href={url}>{pickName}</a>
</PickTitle>
<Description>
<ReactMarkdown
source={translate(`picks.${twitterName}.description`)}
/>
</Description>
</PickContent>
<PicksIntro>{translate(`picks.intro`)}</PicksIntro>
</PickContentWrapper>
<PickPerson>
<PickImage>
<div>
<a
href={`https://twitter.com/${twitterName}`}
style={{
backgroundImage: `url(/images/picks/${twitterName}.jpg)`,
}}
title={fullName}
>
{fullName}
</a>
</div>
</PickImage>
<PickCredit>
<PickName>
<a href={`https://twitter.com/${twitterName}`}>{fullName}</a>
</PickName>
<PickBio>{translate(`picks.${twitterName}.bio`)}</PickBio>
</PickCredit>
</PickPerson>
</Pick>
</div>
</PicksContainer>
)
}
PicksBlock.propTypes = {
section: PropTypes.string,
}
const PicksContainer = styled.div`
margin-bottom: ${spacing(2)};
`
const Pick = styled.div`
margin-bottom: ${spacing(4)};
`
const triangleWidth = 2
const PickContentWrapper = styled.div`
position: relative;
`
const PickContent = styled.div`
background: ${color('backgroundInvertedAlt')};
color: ${color('textInverted')};
position: relative;
margin-bottom: ${spacing(0.75)};
@media ${mq.small} {
padding: ${spacing(0.75)} ${spacing()} ${spacing()} ${spacing()};
}
@media ${mq.mediumLarge} {
padding: ${spacing(1)} ${spacing(1.5)} ${spacing(1.5)} ${spacing(1.5)};
}
&:after {
content: ' ';
clip-path: polygon(0 0, 100% 0, 50% 100%);
background: ${color('backgroundInvertedAlt')};
position: absolute;
width: ${spacing(triangleWidth)};
height: ${spacing(triangleWidth / 2)};
bottom: -${spacing(triangleWidth / 2)};
left: ${spacing(triangleWidth)};
}
`
const PickTitle = styled.h3`
margin-bottom: ${spacing(0.5)};
`
const Description = styled.div`
font-size: ${fontSize('smallish')};
`
const PicksIntroMobile = styled.div`
font-size: ${fontSize('small')};
text-align: center;
margin-bottom: ${spacing(0.5)};
color: ${({ theme }) => theme.colors.textAlt};
@media ${mq.mediumLarge} {
display: none;
}
`
const PicksIntro = styled.div`
font-size: ${fontSize('small')};
text-align: right;
position: absolute;
bottom: -30px;
right: 0;
color: ${({ theme }) => theme.colors.textAlt};
@media ${mq.small} {
display: none;
}
`
const PickPerson = styled.div`
display: inline-flex;
align-items: center;
justify-content: center;
margin-left: 30px;
`
const imageWidth = '60px'
const PickImage = styled.div`
margin-right: ${spacing(0.75)};
width: ${imageWidth};
div {
background: ${({ theme }) => theme.colors.border};
border: 2px solid ${({ theme }) => theme.colors.border};
position: relative;
z-index: 10;
overflow: hidden;
border-radius: 100%;
}
a {
display: block;
width: 100%;
padding-bottom: 100%;
height: 0;
background-position: center center;
background-size: cover;
line-height: 0;
font-size: 0;
color: transparent;
border-radius: 100%;
}
img,
svg {
display: block;
width: 100%;
border: 3px solid white;
}
`
const PickCredit = styled.div``
const PickName = styled.h4`
margin: 0;
`
const PickBio = styled.div`
font-size: ${fontSize('smallish')};
`
export default PicksBlock
| 28.281915 | 97 | 0.490126 |
83d75f439e0191d834ffc28a37df03dfbe4e6e51 | 2,174 | js | JavaScript | src/components/VerifiedTokenImage.js | ThierryM1212/SAFEW | bc1e4aebf2efa74ef9e96d3885e4bf953110a83b | [
"MIT"
] | 7 | 2022-02-03T09:41:53.000Z | 2022-02-22T11:05:44.000Z | src/components/VerifiedTokenImage.js | ThierryM1212/SAFEW | bc1e4aebf2efa74ef9e96d3885e4bf953110a83b | [
"MIT"
] | 4 | 2022-02-05T00:54:13.000Z | 2022-03-14T23:39:14.000Z | src/components/VerifiedTokenImage.js | ThierryM1212/SAFEW | bc1e4aebf2efa74ef9e96d3885e4bf953110a83b | [
"MIT"
] | 2 | 2022-02-04T16:31:04.000Z | 2022-03-25T04:24:43.000Z | import React from 'react';
import { TOKENID_COMET, TOKENID_ERDOGE, TOKENID_ERGOPAD, TOKENID_KUSHTI, TOKENID_LUNADOG, TOKENID_ERGOLD, TOKENID_MI_GORENG, TOKENID_NETA, TOKENID_SIGRSV, TOKENID_SIGUSD } from '../utils/constants';
import sigusdLogo from '../resources/tokens/token-sigusd.svg';
import sigrsvLogo from '../resources/tokens/token-sigrsv.svg';
import kushtiLogo from '../resources/tokens/token-kushti.svg';
import erdogeLogo from '../resources/tokens/token-erdoge.svg';
import ergopadLogo from '../resources/tokens/token-ergopad.svg';
import lunadogLogo from '../resources/tokens/token-lunadog.svg';
import netaLogo from '../resources/tokens/token-neta.svg';
import miGorengLogo from '../resources/tokens/token-mi-goreng.svg';
import cometLogo from '../resources/tokens/token-comet.svg';
import unknown from '../resources/tokens/token-unknown.png';
import ergoldLogo from '../resources/tokens/token-ergold.svg';
export default class VerifiedTokenImage extends React.Component {
constructor(props) {
super(props);
this.state = {
tokenId: props.tokenId,
};
//this.zoomInOut = this.zoomInOut.bind(this);
}
renderSwitch = (tokenId) => {
//console.log("VerifiedTokenImage", tokenId)
switch (tokenId) {
case TOKENID_SIGUSD:
return sigusdLogo;
case TOKENID_SIGRSV:
return sigrsvLogo;
case TOKENID_KUSHTI:
return kushtiLogo;
case TOKENID_ERDOGE:
return erdogeLogo;
case TOKENID_ERGOPAD:
return ergopadLogo;
case TOKENID_LUNADOG:
return lunadogLogo;
case TOKENID_NETA:
return netaLogo;
case TOKENID_MI_GORENG:
return miGorengLogo;
case TOKENID_COMET:
return cometLogo;
case TOKENID_ERGOLD:
return ergoldLogo;
default:
return unknown;
}
}
render() {
return (
<img src={this.renderSwitch(this.state.tokenId)} alt={this.state.tokenId} />
)
}
}
| 35.639344 | 198 | 0.629715 |