PageSourceSearch

https://www.zarinpal.com/webcomponents/zarinReport/config.js

js zarinpal.com collected 2026-09-24 18:54:42 UTC 1,753 bytes, 75 lines download raw bytes

1class ConfigSingleton {
2  constructor() {
3    if (ConfigSingleton.instance) {
4      return ConfigSingleton.instance;
5    }
6
7    this._config = {
8      api: {
9        baseURL:
10          (window.__NUXT__ &&
11            window.__NUXT__.config &&
12            window.__NUXT__.config.public &&
13            window.__NUXT__.config.public.apiBase) ||
14            "https://www.zarinpal.com/api",
15        timeout: 30000,
16        retryAttempts: 3,
17        retryDelay: 1000,
18      },
19      form: {
20        autoSave: true,
21        autoSaveInterval: 30000,
22        validation: { realTime: true, showErrors: true },
23      },
24      ui: {
25        theme: "light",
26        language: "fa",
27        direction: "rtl",
28        animations: true,
29      },
30      security: {
31        enableCSRF: true,
32        enableRateLimit: true,
33        maxRequestsPerMinute: 10,
34      },
35      fileUpload: {
36        maxSize: 5 * 1024 * 1024,
37        allowedTypes: [
38          "image/jpeg",
39          "image/png",
40          "image/gif",
41          "application/pdf",
42          "application/msword",
43          "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
44        ],
45        maxFiles: 3,
46      },
47      notifications: {
48        duration: 5000,
49        position: "top-right",
50        enableSound: false,
51      },
52      development: {
53        enableLogging: true,
54        enableMockData: true,
55        enableDebugMode: false,
56      },
57    };
58
59    ConfigSingleton.instance = this;
60  }
61
62  getInstance() {
63    return ConfigSingleton.instance;
64  }
65
66  get config() {
67    return this._config;
68  }
69}
70
71// Export singleton instance
72export const configSingleton = new ConfigSingleton();
73
74// Export config for backward compatibility
75export const config = configSingleton._config;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.