@necrolab/dashboard 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +45 -0
- package/.eslintrc.js +24 -0
- package/.prettierignore +1 -0
- package/.prettierrc +10 -0
- package/.vscode/extensions.json +3 -0
- package/ICONS.md +21 -0
- package/README.md +65 -0
- package/backend/api.js +430 -0
- package/backend/auth.js +62 -0
- package/backend/batching.js +43 -0
- package/backend/endpoints.js +343 -0
- package/backend/index.js +23 -0
- package/backend/mock-data.js +66 -0
- package/backend/mock-src/classes/logger.js +112 -0
- package/backend/mock-src/classes/utils.js +42 -0
- package/backend/mock-src/ticketmaster.js +92 -0
- package/backend/validator.js +62 -0
- package/config/configs.json +20 -0
- package/config/filter.json +3 -0
- package/config/presale.csv +3 -0
- package/config/proxies.txt +6 -0
- package/config/used-codes.json +4 -0
- package/index.html +114 -0
- package/index.js +2 -0
- package/jsconfig.json +16 -0
- package/package.json +48 -0
- package/postcss.config.js +6 -0
- package/postinstall.js +9 -0
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/flags/ae.svg +1 -0
- package/public/flags/at.svg +1 -0
- package/public/flags/au.svg +1 -0
- package/public/flags/be.svg +1 -0
- package/public/flags/ch.svg +1 -0
- package/public/flags/cz.svg +1 -0
- package/public/flags/de.svg +1 -0
- package/public/flags/dk.svg +1 -0
- package/public/flags/es.svg +1 -0
- package/public/flags/nl.svg +1 -0
- package/public/flags/no.svg +1 -0
- package/public/flags/nz.svg +1 -0
- package/public/flags/pl.svg +1 -0
- package/public/flags/se.svg +1 -0
- package/public/flags/uk.svg +1 -0
- package/public/flags/us.svg +1 -0
- package/public/img/award.svg +3 -0
- package/public/img/background.svg +14 -0
- package/public/img/bag_w.svg +12 -0
- package/public/img/banks/amex.svg +4 -0
- package/public/img/banks/mastercard.svg +4 -0
- package/public/img/banks/visa.svg +4 -0
- package/public/img/camera.svg +3 -0
- package/public/img/close.svg +3 -0
- package/public/img/controls/disable.svg +5 -0
- package/public/img/controls/enable.svg +5 -0
- package/public/img/groups.svg +3 -0
- package/public/img/hand.svg +3 -0
- package/public/img/key.svg +3 -0
- package/public/img/logo.png +0 -0
- package/public/img/logo_icon.png +0 -0
- package/public/img/logo_icon_2.png +0 -0
- package/public/img/logo_trans.png +0 -0
- package/public/img/loyalty.svg +3 -0
- package/public/img/mail.svg +3 -0
- package/public/img/pencil.svg +3 -0
- package/public/img/profile.svg +4 -0
- package/public/img/reload.svg +3 -0
- package/public/img/sandclock.svg +25 -0
- package/public/img/save.svg +5 -0
- package/public/img/savings.svg +3 -0
- package/public/img/scanner.svg +3 -0
- package/public/img/sell.svg +3 -0
- package/public/img/shield.svg +3 -0
- package/public/img/ski.svg +3 -0
- package/public/img/stadium.svg +8 -0
- package/public/img/stadium_w.svg +8 -0
- package/public/img/timer.svg +3 -0
- package/public/manifest.json +27 -0
- package/public/robots.txt +2 -0
- package/run +10 -0
- package/src/App.vue +307 -0
- package/src/assets/css/_input.scss +197 -0
- package/src/assets/css/main.scss +269 -0
- package/src/assets/css/tailwind.css +3 -0
- package/src/assets/img/award.svg +3 -0
- package/src/assets/img/background.svg +11 -0
- package/src/assets/img/camera.svg +3 -0
- package/src/assets/img/close.svg +3 -0
- package/src/assets/img/eyes/closed.svg +13 -0
- package/src/assets/img/eyes/open.svg +12 -0
- package/src/assets/img/groups.svg +3 -0
- package/src/assets/img/hand.svg +3 -0
- package/src/assets/img/key.svg +3 -0
- package/src/assets/img/logo.png +0 -0
- package/src/assets/img/logo_icon.png +0 -0
- package/src/assets/img/logo_icon_2.png +0 -0
- package/src/assets/img/logo_trans.png +0 -0
- package/src/assets/img/loyalty.svg +3 -0
- package/src/assets/img/mail.svg +3 -0
- package/src/assets/img/pencil.svg +3 -0
- package/src/assets/img/reload.svg +3 -0
- package/src/assets/img/savings.svg +3 -0
- package/src/assets/img/scanner.svg +3 -0
- package/src/assets/img/sell.svg +3 -0
- package/src/assets/img/shield.svg +3 -0
- package/src/assets/img/ski.svg +3 -0
- package/src/assets/img/square_check.svg +5 -0
- package/src/assets/img/square_uncheck.svg +5 -0
- package/src/assets/img/stadium.svg +8 -0
- package/src/assets/img/timer.svg +3 -0
- package/src/assets/img/wildcard.svg +7 -0
- package/src/components/Auth/LoginForm.vue +48 -0
- package/src/components/Editors/Account/Account.vue +119 -0
- package/src/components/Editors/Account/AccountCreator.vue +147 -0
- package/src/components/Editors/Account/AccountView.vue +87 -0
- package/src/components/Editors/Account/CreateAccount.vue +106 -0
- package/src/components/Editors/Profile/CreateProfile.vue +321 -0
- package/src/components/Editors/Profile/Profile.vue +142 -0
- package/src/components/Editors/Profile/ProfileCountryChooser.vue +75 -0
- package/src/components/Editors/Profile/ProfileView.vue +96 -0
- package/src/components/Editors/TagLabel.vue +16 -0
- package/src/components/Editors/TagToggle.vue +41 -0
- package/src/components/Filter/Filter.vue +409 -0
- package/src/components/Filter/FilterPreview.vue +236 -0
- package/src/components/Filter/PriceSortToggle.vue +105 -0
- package/src/components/Table/Header.vue +5 -0
- package/src/components/Table/Row.vue +5 -0
- package/src/components/Table/Table.vue +14 -0
- package/src/components/Table/index.js +4 -0
- package/src/components/Tasks/CheckStock.vue +62 -0
- package/src/components/Tasks/Controls/DesktopControls.vue +73 -0
- package/src/components/Tasks/Controls/MobileControls.vue +32 -0
- package/src/components/Tasks/Controls/index.js +3 -0
- package/src/components/Tasks/CreateTaskAXS.vue +339 -0
- package/src/components/Tasks/CreateTaskTM.vue +459 -0
- package/src/components/Tasks/MassEdit.vue +50 -0
- package/src/components/Tasks/QuickSettings.vue +167 -0
- package/src/components/Tasks/ScrapeVenue.vue +42 -0
- package/src/components/Tasks/Stats.vue +66 -0
- package/src/components/Tasks/Task.vue +296 -0
- package/src/components/Tasks/TaskLabel.vue +20 -0
- package/src/components/Tasks/TaskView.vue +126 -0
- package/src/components/Tasks/Utilities.vue +33 -0
- package/src/components/icons/Award.vue +8 -0
- package/src/components/icons/Bag.vue +8 -0
- package/src/components/icons/BagWhite.vue +8 -0
- package/src/components/icons/Box.vue +8 -0
- package/src/components/icons/Camera.vue +8 -0
- package/src/components/icons/Cart.vue +8 -0
- package/src/components/icons/Check.vue +5 -0
- package/src/components/icons/Checkmark.vue +11 -0
- package/src/components/icons/Click.vue +8 -0
- package/src/components/icons/Close.vue +21 -0
- package/src/components/icons/CloseX.vue +5 -0
- package/src/components/icons/Console.vue +13 -0
- package/src/components/icons/Down.vue +8 -0
- package/src/components/icons/Edit.vue +13 -0
- package/src/components/icons/Event.vue +8 -0
- package/src/components/icons/Expand.vue +8 -0
- package/src/components/icons/Filter.vue +13 -0
- package/src/components/icons/Gear.vue +8 -0
- package/src/components/icons/Group.vue +8 -0
- package/src/components/icons/Hand.vue +8 -0
- package/src/components/icons/Key.vue +21 -0
- package/src/components/icons/Logout.vue +13 -0
- package/src/components/icons/Loyalty.vue +8 -0
- package/src/components/icons/Mail.vue +8 -0
- package/src/components/icons/Menu.vue +8 -0
- package/src/components/icons/Pause.vue +5 -0
- package/src/components/icons/Pencil.vue +21 -0
- package/src/components/icons/Play.vue +8 -0
- package/src/components/icons/Plus.vue +8 -0
- package/src/components/icons/Profile.vue +18 -0
- package/src/components/icons/Reload.vue +7 -0
- package/src/components/icons/Sandclock.vue +33 -0
- package/src/components/icons/Savings.vue +8 -0
- package/src/components/icons/Scanner.vue +8 -0
- package/src/components/icons/Scrape.vue +8 -0
- package/src/components/icons/Sell.vue +21 -0
- package/src/components/icons/Shield.vue +8 -0
- package/src/components/icons/Shrink.vue +8 -0
- package/src/components/icons/Ski.vue +8 -0
- package/src/components/icons/Spinner.vue +42 -0
- package/src/components/icons/SquareCheck.vue +18 -0
- package/src/components/icons/SquareUncheck.vue +18 -0
- package/src/components/icons/Stadium.vue +13 -0
- package/src/components/icons/StadiumWhite.vue +13 -0
- package/src/components/icons/Status.vue +8 -0
- package/src/components/icons/Tag.vue +8 -0
- package/src/components/icons/Tasks.vue +13 -0
- package/src/components/icons/Ticket.vue +8 -0
- package/src/components/icons/Timer.vue +8 -0
- package/src/components/icons/Trash.vue +8 -0
- package/src/components/icons/Up.vue +10 -0
- package/src/components/icons/Wildcard.vue +18 -0
- package/src/components/icons/index.js +111 -0
- package/src/components/ui/Modal.vue +61 -0
- package/src/components/ui/Navbar.vue +207 -0
- package/src/components/ui/ReconnectIndicator.vue +90 -0
- package/src/components/ui/Splash.vue +24 -0
- package/src/components/ui/controls/CountryChooser.vue +87 -0
- package/src/components/ui/controls/EyeToggle.vue +11 -0
- package/src/components/ui/controls/atomic/Checkbox.vue +28 -0
- package/src/components/ui/controls/atomic/Dropdown.vue +138 -0
- package/src/components/ui/controls/atomic/LoadingButton.vue +45 -0
- package/src/components/ui/controls/atomic/MultiDropdown.vue +262 -0
- package/src/components/ui/controls/atomic/Switch.vue +84 -0
- package/src/libs/Filter.js +593 -0
- package/src/libs/ansii.js +565 -0
- package/src/libs/panzoom.js +1413 -0
- package/src/main.js +23 -0
- package/src/registerServiceWorker.js +32 -0
- package/src/router/index.js +65 -0
- package/src/stores/cities.json +1 -0
- package/src/stores/connection.js +399 -0
- package/src/stores/countries.js +88 -0
- package/src/stores/logger.js +103 -0
- package/src/stores/requests.js +88 -0
- package/src/stores/sampleData.js +1034 -0
- package/src/stores/ui.js +584 -0
- package/src/stores/utils.js +554 -0
- package/src/types/index.js +42 -0
- package/src/utils/debug.js +1 -0
- package/src/views/Accounts.vue +191 -0
- package/src/views/Console.vue +224 -0
- package/src/views/Editor.vue +785 -0
- package/src/views/FilterBuilder.vue +785 -0
- package/src/views/Login.vue +27 -0
- package/src/views/Profiles.vue +209 -0
- package/src/views/Tasks.vue +157 -0
- package/static/offline.html +184 -0
- package/tailwind.config.js +57 -0
- package/vite.config.js +63 -0
- package/vue.config.js +32 -0
- package/workbox-config.js +66 -0
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
import cities from "./cities.json";
|
|
2
|
+
|
|
3
|
+
function generateStreetAddress() {
|
|
4
|
+
const streetTypes = [
|
|
5
|
+
"Street",
|
|
6
|
+
"Avenue",
|
|
7
|
+
"Drive",
|
|
8
|
+
"Road",
|
|
9
|
+
"Boulevard",
|
|
10
|
+
"Lane",
|
|
11
|
+
"Way",
|
|
12
|
+
"Circle",
|
|
13
|
+
"Court",
|
|
14
|
+
"Place",
|
|
15
|
+
"Terrace",
|
|
16
|
+
"Parkway",
|
|
17
|
+
"Trail",
|
|
18
|
+
"Path",
|
|
19
|
+
"Loop"
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const streetNames = [
|
|
23
|
+
// Common Family Names (reflecting historical property owners)
|
|
24
|
+
"Anderson",
|
|
25
|
+
"Bennett",
|
|
26
|
+
"Collins",
|
|
27
|
+
"Davidson",
|
|
28
|
+
"Edwards",
|
|
29
|
+
"Foster",
|
|
30
|
+
"Gregory",
|
|
31
|
+
"Harrison",
|
|
32
|
+
"Irving",
|
|
33
|
+
"Jensen",
|
|
34
|
+
"Kennedy",
|
|
35
|
+
"Lawrence",
|
|
36
|
+
"Mitchell",
|
|
37
|
+
"Nelson",
|
|
38
|
+
"Patterson",
|
|
39
|
+
"Richardson",
|
|
40
|
+
"Stevens",
|
|
41
|
+
"Thompson",
|
|
42
|
+
"Walker",
|
|
43
|
+
"Wilson",
|
|
44
|
+
|
|
45
|
+
// Local Geography (subtle features)
|
|
46
|
+
"Hidden Valley",
|
|
47
|
+
"Pleasant View",
|
|
48
|
+
"Rolling",
|
|
49
|
+
"Scenic",
|
|
50
|
+
"Shady Grove",
|
|
51
|
+
"Stone Gate",
|
|
52
|
+
"Sunset",
|
|
53
|
+
"Valley View",
|
|
54
|
+
"Willow Brook",
|
|
55
|
+
"Woodland",
|
|
56
|
+
"Green Valley",
|
|
57
|
+
"Highland",
|
|
58
|
+
"Hillside",
|
|
59
|
+
"Lake View",
|
|
60
|
+
"Meadow",
|
|
61
|
+
"North Point",
|
|
62
|
+
"Oak Grove",
|
|
63
|
+
"River Bend",
|
|
64
|
+
"Spring",
|
|
65
|
+
"Westfield",
|
|
66
|
+
|
|
67
|
+
// Historical References (industries, landmarks)
|
|
68
|
+
"Mill Creek",
|
|
69
|
+
"Old Farm",
|
|
70
|
+
"Pioneer",
|
|
71
|
+
"Railway",
|
|
72
|
+
"School House",
|
|
73
|
+
"Station",
|
|
74
|
+
"Trading Post",
|
|
75
|
+
"Village Green",
|
|
76
|
+
"Water Tower",
|
|
77
|
+
"Grist Mill",
|
|
78
|
+
"Forge",
|
|
79
|
+
"Quarry",
|
|
80
|
+
"Cotton Mill",
|
|
81
|
+
"Mill Stone",
|
|
82
|
+
"Factory",
|
|
83
|
+
"Foundry",
|
|
84
|
+
"Market",
|
|
85
|
+
"Old Post",
|
|
86
|
+
"Town Hall",
|
|
87
|
+
"Workshop",
|
|
88
|
+
|
|
89
|
+
// Community Features
|
|
90
|
+
"Chapel",
|
|
91
|
+
"Church",
|
|
92
|
+
"College",
|
|
93
|
+
"Commons",
|
|
94
|
+
"Garden",
|
|
95
|
+
"Library",
|
|
96
|
+
"Museum",
|
|
97
|
+
"Park Place",
|
|
98
|
+
"Town Square",
|
|
99
|
+
"University",
|
|
100
|
+
"Academy",
|
|
101
|
+
"Campus",
|
|
102
|
+
"Central",
|
|
103
|
+
"Civic Center",
|
|
104
|
+
"Community",
|
|
105
|
+
"Institute",
|
|
106
|
+
"School",
|
|
107
|
+
"Union",
|
|
108
|
+
"Village",
|
|
109
|
+
"Center",
|
|
110
|
+
|
|
111
|
+
// Native Flora (region-specific)
|
|
112
|
+
"Aspen",
|
|
113
|
+
"Birch",
|
|
114
|
+
"Cedar",
|
|
115
|
+
"Dogwood",
|
|
116
|
+
"Elm",
|
|
117
|
+
"Hickory",
|
|
118
|
+
"Juniper",
|
|
119
|
+
"Maple",
|
|
120
|
+
"Oak",
|
|
121
|
+
"Pine",
|
|
122
|
+
"Sycamore",
|
|
123
|
+
"Walnut",
|
|
124
|
+
"Willow",
|
|
125
|
+
"Beech",
|
|
126
|
+
"Chestnut",
|
|
127
|
+
"Hawthorn",
|
|
128
|
+
"Locust",
|
|
129
|
+
"Magnolia",
|
|
130
|
+
"Poplar",
|
|
131
|
+
"Spruce",
|
|
132
|
+
|
|
133
|
+
// Settlement Patterns
|
|
134
|
+
"Cottage",
|
|
135
|
+
"Farmstead",
|
|
136
|
+
"Homestead",
|
|
137
|
+
"Manor",
|
|
138
|
+
"Plantation",
|
|
139
|
+
"Ranch",
|
|
140
|
+
"Settlement",
|
|
141
|
+
"Estate",
|
|
142
|
+
"Frontier",
|
|
143
|
+
"Heritage",
|
|
144
|
+
"Colonial",
|
|
145
|
+
"Crossroads",
|
|
146
|
+
"Junction",
|
|
147
|
+
"Landing",
|
|
148
|
+
"Milestone",
|
|
149
|
+
"Outpost",
|
|
150
|
+
"Pioneer",
|
|
151
|
+
"Settlers",
|
|
152
|
+
"Township",
|
|
153
|
+
"Waypoint",
|
|
154
|
+
|
|
155
|
+
// Everyday Objects (historical context)
|
|
156
|
+
"Kettle",
|
|
157
|
+
"Lantern",
|
|
158
|
+
"Millstone",
|
|
159
|
+
"Pocket",
|
|
160
|
+
"Saddle",
|
|
161
|
+
"Wagon",
|
|
162
|
+
"Wheel",
|
|
163
|
+
"Basket",
|
|
164
|
+
"Bucket",
|
|
165
|
+
"Candle",
|
|
166
|
+
|
|
167
|
+
// Subtle Descriptive
|
|
168
|
+
"Clear",
|
|
169
|
+
"Fair",
|
|
170
|
+
"Golden",
|
|
171
|
+
"Green",
|
|
172
|
+
"Pleasant",
|
|
173
|
+
"Quiet",
|
|
174
|
+
"Silent",
|
|
175
|
+
"Summer",
|
|
176
|
+
"Sunny",
|
|
177
|
+
"Sweet",
|
|
178
|
+
"Tender",
|
|
179
|
+
"Gentle",
|
|
180
|
+
"Bright",
|
|
181
|
+
"Calm",
|
|
182
|
+
"Fresh",
|
|
183
|
+
"Kind",
|
|
184
|
+
"Pure",
|
|
185
|
+
"Simple",
|
|
186
|
+
"Soft",
|
|
187
|
+
"Warm",
|
|
188
|
+
|
|
189
|
+
// Local Culture
|
|
190
|
+
"Heritage",
|
|
191
|
+
"Legacy",
|
|
192
|
+
"Memory",
|
|
193
|
+
"Tradition",
|
|
194
|
+
"Harmony",
|
|
195
|
+
"Liberty",
|
|
196
|
+
"Unity",
|
|
197
|
+
"Freedom",
|
|
198
|
+
"Justice",
|
|
199
|
+
"Progress",
|
|
200
|
+
"Friendship",
|
|
201
|
+
"Goodwill",
|
|
202
|
+
"Honor",
|
|
203
|
+
"Peace",
|
|
204
|
+
"Prosperity",
|
|
205
|
+
"Spirit",
|
|
206
|
+
"Trust",
|
|
207
|
+
"Victory",
|
|
208
|
+
"Virtue",
|
|
209
|
+
"Welcome",
|
|
210
|
+
|
|
211
|
+
// Regional Industries
|
|
212
|
+
"Dairy",
|
|
213
|
+
"Granary",
|
|
214
|
+
"Harvest",
|
|
215
|
+
"Orchard",
|
|
216
|
+
"Pasture",
|
|
217
|
+
"Timber",
|
|
218
|
+
"Vineyard",
|
|
219
|
+
"Farming",
|
|
220
|
+
"Mining",
|
|
221
|
+
"Trading",
|
|
222
|
+
"Commerce",
|
|
223
|
+
"Industry",
|
|
224
|
+
"Labor",
|
|
225
|
+
"Market",
|
|
226
|
+
"Merchant",
|
|
227
|
+
"Production",
|
|
228
|
+
"Storage",
|
|
229
|
+
"Transport",
|
|
230
|
+
"Warehouse",
|
|
231
|
+
"Workshop",
|
|
232
|
+
|
|
233
|
+
// Practical Descriptors
|
|
234
|
+
"Branch",
|
|
235
|
+
"Corner",
|
|
236
|
+
"Crossing",
|
|
237
|
+
"Edge",
|
|
238
|
+
"Gate",
|
|
239
|
+
"Path",
|
|
240
|
+
"Ridge",
|
|
241
|
+
"Trail",
|
|
242
|
+
"Turn",
|
|
243
|
+
"Way",
|
|
244
|
+
"Bend",
|
|
245
|
+
"Bridge",
|
|
246
|
+
"Fork",
|
|
247
|
+
"Hill",
|
|
248
|
+
"Junction",
|
|
249
|
+
"Pass",
|
|
250
|
+
"Point",
|
|
251
|
+
"Route",
|
|
252
|
+
"Track",
|
|
253
|
+
"Walk",
|
|
254
|
+
|
|
255
|
+
// Time Periods
|
|
256
|
+
"Colonial",
|
|
257
|
+
"Federal",
|
|
258
|
+
"Heritage",
|
|
259
|
+
"Historic",
|
|
260
|
+
"Legacy",
|
|
261
|
+
"Modern",
|
|
262
|
+
"Old",
|
|
263
|
+
"Pioneer",
|
|
264
|
+
"Settler",
|
|
265
|
+
"Traditional",
|
|
266
|
+
"Ancient",
|
|
267
|
+
"Classic",
|
|
268
|
+
"Early",
|
|
269
|
+
"Former",
|
|
270
|
+
"Late",
|
|
271
|
+
"New",
|
|
272
|
+
"Past",
|
|
273
|
+
"Present",
|
|
274
|
+
"Timeless",
|
|
275
|
+
"Vintage"
|
|
276
|
+
];
|
|
277
|
+
|
|
278
|
+
const numberSuffixes = ["st", "nd", "rd", "th"];
|
|
279
|
+
const directions = ["North", "South", "East", "West", "Northwest", "Northeast", "Southwest", "Southeast"];
|
|
280
|
+
|
|
281
|
+
const generateNumber = () => {
|
|
282
|
+
const num = Math.floor(Math.random() * 9998) + 1;
|
|
283
|
+
return num.toString().padStart(1, "0");
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
const getRandomElement = (array) => array[Math.floor(Math.random() * array.length)];
|
|
287
|
+
|
|
288
|
+
const generateBaseName = () => {
|
|
289
|
+
// 10% chance for numbered street
|
|
290
|
+
if (Math.random() < 0.1) {
|
|
291
|
+
const num = Math.floor(Math.random() * 200) + 1;
|
|
292
|
+
const suffix = numberSuffixes[num <= 3 ? num - 1 : 3];
|
|
293
|
+
return `${num}${suffix}`;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
// 15% chance for directional prefix
|
|
297
|
+
if (Math.random() < 0.15) {
|
|
298
|
+
return `${getRandomElement(directions)} ${getRandomElement(streetNames)}`;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// 5% chance for compound name
|
|
302
|
+
if (Math.random() < 0.05) {
|
|
303
|
+
const first = getRandomElement(streetNames);
|
|
304
|
+
const second = getRandomElement(streetNames);
|
|
305
|
+
return first !== second ? `${first} ${second}` : first;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
return getRandomElement(streetNames);
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
const houseNumber = generateNumber();
|
|
312
|
+
const streetName = generateBaseName();
|
|
313
|
+
const streetType = getRandomElement(streetTypes);
|
|
314
|
+
|
|
315
|
+
return `${houseNumber} ${streetName} ${streetType}`.trim().replace(/\s+/g, " ");
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const sortAlphaNum = (a, b) => {
|
|
319
|
+
var reA = /[^a-zA-Z]/g;
|
|
320
|
+
var reN = /[^0-9]/g;
|
|
321
|
+
var AInt = parseInt(a, 10);
|
|
322
|
+
var BInt = parseInt(b, 10);
|
|
323
|
+
|
|
324
|
+
if (isNaN(AInt) && isNaN(BInt)) {
|
|
325
|
+
var aA = a.replace(reA, "");
|
|
326
|
+
var bA = b.replace(reA, "");
|
|
327
|
+
if (aA === bA) {
|
|
328
|
+
var aN = parseInt(a.replace(reN, ""), 10);
|
|
329
|
+
var bN = parseInt(b.replace(reN, ""), 10);
|
|
330
|
+
return aN === bN ? 0 : aN > bN ? 1 : -1;
|
|
331
|
+
} else {
|
|
332
|
+
return aA > bA ? 1 : -1;
|
|
333
|
+
}
|
|
334
|
+
} else if (isNaN(AInt)) {
|
|
335
|
+
//A is not an Int
|
|
336
|
+
return 1; //to make alphanumeric sort first return -1 here
|
|
337
|
+
} else if (isNaN(BInt)) {
|
|
338
|
+
//B is not an Int
|
|
339
|
+
return -1; //to make alphanumeric sort first return 1 here
|
|
340
|
+
} else {
|
|
341
|
+
return AInt > BInt ? 1 : -1;
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
const timeDifference = (date1, date2) => {
|
|
346
|
+
let dif = date1 - date2;
|
|
347
|
+
if (dif < 0) return "00:00";
|
|
348
|
+
|
|
349
|
+
const dayDif = Math.floor(dif / 1000 / 60 / 60 / 24);
|
|
350
|
+
dif -= dayDif * 1000 * 60 * 60 * 24;
|
|
351
|
+
const hourDif = Math.floor(dif / 1000 / 60 / 60);
|
|
352
|
+
dif -= hourDif * 1000 * 60 * 60;
|
|
353
|
+
const minDif = Math.floor(dif / 1000 / 60);
|
|
354
|
+
dif -= minDif * 1000 * 60;
|
|
355
|
+
const secDif = Math.floor(dif / 1000);
|
|
356
|
+
|
|
357
|
+
const strMin = String(minDif).padStart(2, "0");
|
|
358
|
+
const strSec = String(secDif).padStart(2, "0");
|
|
359
|
+
const str = `${strMin}:${strSec}`;
|
|
360
|
+
if (str === "NaN:NaN") return "00:00";
|
|
361
|
+
return str;
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
const parseEventUrl = (url) => {
|
|
365
|
+
if (!url.includes("https://")) {
|
|
366
|
+
return { eventId: url };
|
|
367
|
+
}
|
|
368
|
+
const urlRegex = /^.*?\/([^/?]+)(?:\?(.*))?$/i;
|
|
369
|
+
const [, eventId, queryString = ""] = url.match(urlRegex) || [];
|
|
370
|
+
const queryParams = new URLSearchParams(queryString);
|
|
371
|
+
|
|
372
|
+
return {
|
|
373
|
+
eventId: eventId,
|
|
374
|
+
eventDid: queryParams.get("did"),
|
|
375
|
+
clOrigin: queryParams.get("subchannel_id") || queryParams.get("CL_ORIGIN")
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
const isEU = (siteId) => !["US", "AU", "UK", "LN", "CA", "NZ", "IE"].includes(siteId.replaceAll("TM_", ""));
|
|
380
|
+
|
|
381
|
+
const removeDuplicates = (arr) => [...new Set(arr)];
|
|
382
|
+
|
|
383
|
+
const pickRandom = (arr) => arr[Math.floor(Math.random() * arr.length)];
|
|
384
|
+
|
|
385
|
+
const fakeId = () => {
|
|
386
|
+
const cityInfo = pickRandom(cities.filter((x) => x[2] != "GA" && x[2] != "PR" && x[0] > 10000));
|
|
387
|
+
|
|
388
|
+
const profile = {
|
|
389
|
+
zipCode: String(cityInfo[0]),
|
|
390
|
+
address: generateStreetAddress()
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
profile.city = cityInfo[1];
|
|
394
|
+
profile.state = cityInfo[2];
|
|
395
|
+
|
|
396
|
+
return profile;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
// Card type definitions with their patterns and gaps
|
|
400
|
+
const CARD_TYPES = {
|
|
401
|
+
visa: {
|
|
402
|
+
pattern: /^4\d{12}(?:\d{3})?$/,
|
|
403
|
+
gaps: [4, 8, 12]
|
|
404
|
+
},
|
|
405
|
+
mastercard: {
|
|
406
|
+
pattern: /^5[1-5]\d{14}$/,
|
|
407
|
+
gaps: [4, 8, 12]
|
|
408
|
+
},
|
|
409
|
+
amex: {
|
|
410
|
+
pattern: /^3[47]\d{13}$/,
|
|
411
|
+
gaps: [4, 10]
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
// Implementation of Luhn algorithm for card number validation
|
|
416
|
+
function luhnCheck(cardNumber) {
|
|
417
|
+
const digits = cardNumber.replace(/\D/g, "");
|
|
418
|
+
let sum = 0;
|
|
419
|
+
let isEven = false;
|
|
420
|
+
|
|
421
|
+
// Loop from right to left
|
|
422
|
+
for (let i = digits.length - 1; i >= 0; i--) {
|
|
423
|
+
let digit = parseInt(digits[i], 10);
|
|
424
|
+
|
|
425
|
+
if (isEven) {
|
|
426
|
+
digit *= 2;
|
|
427
|
+
if (digit > 9) {
|
|
428
|
+
digit -= 9;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
sum += digit;
|
|
433
|
+
isEven = !isEven;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
return sum % 10 === 0;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
const getCardType = (str) => {
|
|
440
|
+
switch (str?.[0]) {
|
|
441
|
+
default:
|
|
442
|
+
case "4":
|
|
443
|
+
return "Visa";
|
|
444
|
+
case "3":
|
|
445
|
+
return "Amex";
|
|
446
|
+
case "5":
|
|
447
|
+
return "Master";
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
// Format card number with proper spacing
|
|
452
|
+
function formatCardNumber(cardNumber, gaps) {
|
|
453
|
+
try {
|
|
454
|
+
const cleanNumber = cardNumber.replace(/\D/g, "");
|
|
455
|
+
const formatted = cleanNumber.split("");
|
|
456
|
+
|
|
457
|
+
// Insert spaces at the specified gaps
|
|
458
|
+
gaps.forEach((gap, index) => {
|
|
459
|
+
if (formatted.length > gap + index) {
|
|
460
|
+
formatted.splice(gap + index, 0, " ");
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
return formatted.join("");
|
|
465
|
+
} catch {
|
|
466
|
+
return cardNumber;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
// Main validation function
|
|
471
|
+
function validateCard(cardNumber) {
|
|
472
|
+
const cleanNumber = cardNumber.replace(/\s+/g, "");
|
|
473
|
+
const type = getCardType(cleanNumber);
|
|
474
|
+
const cardTypeInfo = CARD_TYPES[type] || CARD_TYPES.visa; // Default to visa gaps if unknown
|
|
475
|
+
|
|
476
|
+
const isValid =
|
|
477
|
+
cleanNumber.length >= 13 && cleanNumber.length <= 19 && /^\d+$/.test(cleanNumber) && luhnCheck(cleanNumber);
|
|
478
|
+
|
|
479
|
+
return {
|
|
480
|
+
type,
|
|
481
|
+
invalid: !isValid,
|
|
482
|
+
formatted: formatCardNumber(cleanNumber, cardTypeInfo.gaps)
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
function sortTaskIds(a, b) {
|
|
487
|
+
const parseId = (id) => {
|
|
488
|
+
if (!id) return { prefix: "", num: -1 };
|
|
489
|
+
|
|
490
|
+
if (/^\d+$/.test(id)) {
|
|
491
|
+
return { prefix: "", num: parseInt(id, 10) };
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
const match = id.match(/^([A-Za-z-]+)(\d+)$/);
|
|
495
|
+
if (match) {
|
|
496
|
+
return { prefix: match[1], num: parseInt(match[2], 10) };
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
return { prefix: id, num: -1 };
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
const aInfo = parseId(a);
|
|
503
|
+
const bInfo = parseId(b);
|
|
504
|
+
|
|
505
|
+
if (aInfo.prefix !== bInfo.prefix) {
|
|
506
|
+
return aInfo.prefix.localeCompare(bInfo.prefix);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
return aInfo.num - bInfo.num;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
function betterSort(a, b) {
|
|
513
|
+
if (a === undefined || a === null) return b === undefined || b === null ? 0 : -1;
|
|
514
|
+
if (b === undefined || b === null) return 1;
|
|
515
|
+
|
|
516
|
+
const aStr = String(a);
|
|
517
|
+
const bStr = String(b);
|
|
518
|
+
|
|
519
|
+
if (!isNaN(aStr) && !isNaN(bStr)) {
|
|
520
|
+
return Number(aStr) - Number(bStr);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
const aParts = aStr.split(/(\d+)/).filter(Boolean);
|
|
524
|
+
const bParts = bStr.split(/(\d+)/).filter(Boolean);
|
|
525
|
+
|
|
526
|
+
const len = Math.min(aParts.length, bParts.length);
|
|
527
|
+
for (let i = 0; i < len; i++) {
|
|
528
|
+
if (!isNaN(aParts[i]) && !isNaN(bParts[i])) {
|
|
529
|
+
const numA = parseInt(aParts[i], 10);
|
|
530
|
+
const numB = parseInt(bParts[i], 10);
|
|
531
|
+
if (numA !== numB) return numA - numB;
|
|
532
|
+
} else {
|
|
533
|
+
const cmp = aParts[i].localeCompare(bParts[i]);
|
|
534
|
+
if (cmp !== 0) return cmp;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
return aParts.length - bParts.length;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export {
|
|
542
|
+
generateStreetAddress,
|
|
543
|
+
timeDifference,
|
|
544
|
+
sortAlphaNum,
|
|
545
|
+
parseEventUrl,
|
|
546
|
+
isEU,
|
|
547
|
+
removeDuplicates,
|
|
548
|
+
pickRandom,
|
|
549
|
+
fakeId,
|
|
550
|
+
getCardType,
|
|
551
|
+
validateCard,
|
|
552
|
+
sortTaskIds,
|
|
553
|
+
betterSort
|
|
554
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} Task
|
|
3
|
+
* @property {string} accountTag
|
|
4
|
+
* @property {boolean} active
|
|
5
|
+
* @property {boolean} agedAccount
|
|
6
|
+
* @property {string} createdAt
|
|
7
|
+
* @property {string} createdAt
|
|
8
|
+
* @property {boolean} doNotPay
|
|
9
|
+
* @property {string} email
|
|
10
|
+
* @property {string} eventCity
|
|
11
|
+
* @property {string} eventDate
|
|
12
|
+
* @property {string} eventId
|
|
13
|
+
* @property {string} eventImage
|
|
14
|
+
* @property {string} eventLocalDate
|
|
15
|
+
* @property {string} eventName
|
|
16
|
+
* @property {string} eventUrl
|
|
17
|
+
* @property {string} eventVenue
|
|
18
|
+
* @property {string} expirationTime
|
|
19
|
+
* @property {boolean} incapsulaBypass
|
|
20
|
+
* @property {boolean} isExpanded
|
|
21
|
+
* @property {boolean} loginAfterCart
|
|
22
|
+
* @property {boolean} manual
|
|
23
|
+
* @property {string} mode
|
|
24
|
+
* @property {string} openerLink
|
|
25
|
+
* @property {string} password
|
|
26
|
+
* @property {string} presaleCode
|
|
27
|
+
* @property {boolean} presaleMode
|
|
28
|
+
* @property {string} profileName
|
|
29
|
+
* @property {Array} profileTags
|
|
30
|
+
* @property {string} proxy
|
|
31
|
+
* @property {number} quantity
|
|
32
|
+
* @property {boolean} quickQueue
|
|
33
|
+
* @property {string} reservedTicketsList
|
|
34
|
+
* @property {boolean} selected
|
|
35
|
+
* @property {string} siteId
|
|
36
|
+
* @property {boolean} smartTimer
|
|
37
|
+
* @property {string} status
|
|
38
|
+
* @property {string} statusColor
|
|
39
|
+
* @property {string} taskId
|
|
40
|
+
* @property {string} venueName
|
|
41
|
+
* @property {string} _timeLeftString
|
|
42
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const DEBUG = window.location.href.startsWith("http://localhost:5173");
|