PageSourceSearch

https://cecindia.in/build/assets/AddNotice-DFoyJ57j.js

js cecindia.in collected 2026-10-07 19:33:07 UTC 6,044 bytes, 97 lines download raw bytes

1var __defProp = Object.defineProperty;
2var __defProps = Object.defineProperties;
3var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5var __hasOwnProp = Object.prototype.hasOwnProperty;
6var __propIsEnum = Object.prototype.propertyIsEnumerable;
7var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8var __spreadValues = (a, b2) => {
9  for (var prop in b2 || (b2 = {}))
10    if (__hasOwnProp.call(b2, prop))
11      __defNormalProp(a, prop, b2[prop]);
12  if (__getOwnPropSymbols)
13    for (var prop of __getOwnPropSymbols(b2)) {
14      if (__propIsEnum.call(b2, prop))
15        __defNormalProp(a, prop, b2[prop]);
16    }
17  return a;
18};
19var __spreadProps = (a, b2) => __defProps(a, __getOwnPropDescs(b2));
20var __async = (__this, __arguments, generator) => {
21  return new Promise((resolve, reject) => {
22    var fulfilled = (value) => {
23      try {
24        step(generator.next(value));
25      } catch (e2) {
26        reject(e2);
27      }
28    };
29    var rejected = (value) => {
30      try {
31        step(generator.throw(value));
32      } catch (e2) {
33        reject(e2);
34      }
35    };
36    var step = (x2) => x2.done ? resolve(x2.value) : Promise.resolve(x2.value).then(fulfilled, rejected);
37    step((generator = generator.apply(__this, __arguments)).next());
38  });
39};
40import { r as d, u as y, n as c, A as b, j as e, B as s, a as u, x as T } from "./app-BVOYVG7k.js";
41import { AdminLayout as I } from "./Dashboard-CNIX_4Ur.js";
42import { D } from "./Dropzone-u56DCejU.js";
43import { u as v } from "./use-form-CWrXXJu-.js";
44import { F as i, T as n } from "./CustomLink-XGyApNzz.js";
45import { L as w } from "./LoadingOverlay-BOitRfTP.js";
46import { D as A } from "./DateInput-Qlol8fKA.js";
47import { T as P } from "./TextInput-CNmGFmvf.js";
48import { I as _ } from "./IconBook-Bb_Lagmo.js";
49import { I as z } from "./IconWorld-DP4C7mZs.js";
50import { T as x } from "./Textarea-Dwh2xtXM.js";
51import "./ThemeIcon-BU9gh0Ki.js";
52import "./IconChevronRight-LyyKBjHa.js";
53import "./createReactComponent-CgpWWcBx.js";
54import "./Collapse-BplwRG9U.js";
55import "./get-style-object-DUJZA7T_.js";
56import "./IconLogout-CkpgU1EF.js";
57import "./Badge-B4uWhfqf.js";
58import "./Progress-C9PiI6sJ.js";
59import "./get-auto-contrast-value-Da6zqqWm.js";
60import "./SimpleGrid-BYuVUcvh.js";
61import "./lodash-BEMU_hbT.js";
62import "./Title-AEHZf_Pl.js";
63import "./IconSearch-BvAEZ284.js";
64import "./IconBook2-Cg4raMvg.js";
65import "./lighten-D2OSxsI2.js";
66import "./Breadcrumbs-D8ZwSM8e.js";
67import "./IconHome2-C6vL2WeW.js";
68import "./use-disclosure-SDaMh0AC.js";
69import "./filesize.esm-CcEPj4ar.js";
70import "./IconX-B02OIiLB.js";
71import "./IconFileTypePdf-_mufS9lS.js";
72import "./dayjs.min-TyjuensG.js";
73import "./use-uncontrolled--dmjAI3_.js";
74import "./AccordionChevron-ziewROvF.js";
75import "./clamp-DTmYCdls.js";
76import "./InputBase-8b8fiagz.js";
77import "./Popover-JBdGCrAF.js";
78import "./get-env-uyVen0u2.js";
79const fe = ({ auth: h }) => {
80  const r = v({ initialValues: { uploaded_date: "", document_id: "", title: "", ocr_text: "", description: "" }, validate: { title: (t) => t.length > 0 ? null : "Required", description: (t) => t.length > 0 ? null : "Required" } }), [f, p] = d.useState(false), [l, j] = d.useState(null), o = y(), g = r.onSubmit((t) => __async(void 0, null, function* () {
81    if (!l) {
82      c.show({ title: "Error", message: "Please upload a pdf file", color: "red" });
83      return;
84    }
85    try {
86      const m = new FormData();
87      m.append("file", l), p(true);
88      const a = yield (yield fetch("/admin/documents/notice/upload", { method: "POST", body: m, headers: { Accept: "application/json" } })).json();
89      a.status === "error" && (c.show({ title: "Error", message: a.message, color: "red" }), p(false)), a.status === "success" && b.post("/admin/documents/notice/add", __spreadProps(__spreadValues({}, t), { document_id: a.data.file_id })), p(false);
90    } catch (e2) {
91    }
92  }));
93  return e.jsx(I, { navActive: ["documents_reports", "documents"], auth: h, breadcrumbsTitle: e.jsxs(i, { gap: "md", children: [e.jsx(T, { href: "/admin/documents/reports", style: { color: o.colors.gray[6], fontWeight: "bold" }, children: "Reports" }), e.jsx(s, { children: "/" }), e.jsx(s, { children: "Add" })] }), children: e.jsxs(i, { gap: "md", children: [e.jsx(s, { style: { width: "50%" }, children: e.jsxs(s, { pos: "relative", children: [e.jsx(w, { visible: f, zIndex: 1e3, overlayProps: { radius: "sm", blur: 2 } }), e.jsx(D, { onFileUploaded: (t) => j(t), fileValue: l }), e.jsxs("form", { onSubmit: g, children: [e.jsx(A, __spreadValues({ label: e.jsx(n, { component: "span", fz: "sm", c: o.colors.primary[9], children: "Uploaded Date:" }), mt: "sm", required: true, placeholder: "Uploaded Date" }, r.getInputProps("uploaded_date"))), e.jsx(P, __spreadValues({ label: e.jsx(n, { component: "span", fz: "sm", c: o.colors.primary[9], children: "Title:" }), size: "sm", placeholder: "Enter Title", style: { marginTop: "15px" }, required: true }, r.getInputProps("title"))), e.jsxs(i, { gap: "md", mt: "xl", justify: "center", children: [e.jsx(u, { variant: "light", children: e.jsxs(i, { align: "center", gap: "sm", children: [e.jsx(_, {}), "Save In Draft"] }) }), e.jsx(u, { type: "submit", children: e.jsxs(i, { align: "center", gap: "sm", children: [e.jsx(z, {}), "Publish"] }) })] })] })] }) }), e.jsxs(s, { style: { width: "50%" }, children: [e.jsx(x, __spreadValues({ label: e.jsx(n, { component: "span", fz: "sm", c: o.colors.primary[9], children: "Description:" }), placeholder: "Enter Description", required: true }, r.getInputProps("description"))), e.jsx(x, __spreadValues({ label: e.jsx(n, { component: "span", fz: "sm", c: o.colors.primary[9], children: "Extracted Ocr Text" }), placeholder: "Auto Feteched", style: { marginTop: "15px" }, styles: { input: { height: "100%" } }, rows: 20, required: true }, r.getInputProps("ocr_text")))] })] }) });
94};
95export {
96  fe as default
97};

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.