/* Compiled from: rsx/theme/components/_archived/unfinished/file_upload.jqhtml */ (function() { 'use strict'; const template_File_Upload = { _jqhtml_version: '2.2.185', name: 'File_Upload', tag: 'div', defaultAttributes: {"class": "mb-3"}, render: function render(data, args, content, jqhtml) { let _output = []; const _cid = this._cid; const that = this; _output.push(" "); if (this.args.label) { _output.push(" ");_output.push({tag: ["label", {"class": "form-label"}, false]}); (() => { const result = this.args.label ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push(""); _output.push(" "); } _output.push(" ");_output.push({tag: ["div", {"class": "border rounded p-4 text-center", "id": "drop_zone" + ":" + this._cid, "data-id": "drop_zone", "style": "cursor: pointer; transition: all 0.2s;"}, false]}); _output.push(" ");_output.push({tag: ["input", {"type": "file", "class": "d-none", "id": "file_input" + ":" + this._cid, "data-id": "file_input"}, true]}); _output.push(""); _output.push(" ");_output.push({tag: ["div", {"id": "placeholder" + ":" + this._cid, "data-id": "placeholder"}, false]}); _output.push(" ");_output.push({tag: ["i", {"class": "bi bi-cloud-upload fs-1 text-muted"}, false]}); _output.push(""); _output.push(" ");_output.push({tag: ["div", {"class": "mt-2"}, false]}); _output.push(" ");_output.push({tag: ["span", {"class": "text-primary"}, false]}); _output.push("Click to upload"); _output.push(""); _output.push(" or drag and drop "); _output.push(""); _output.push(" "); if (this.args.accept) { _output.push(" ");_output.push({tag: ["div", {"class": "text-muted small mt-1"}, false]}); (() => { const result = this.args.accept ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push(""); _output.push(" "); } _output.push(" "); if (this.args.max_size) { _output.push(" ");_output.push({tag: ["div", {"class": "text-muted small"}, false]}); _output.push("Max size: "); (() => { const result = this.args.max_size ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push(""); _output.push(" "); } _output.push(" "); _output.push(""); _output.push({tag: ["div", {"id": "file_info" + ":" + this._cid, "data-id": "file_info", "style": "display: none;"}, false]}); _output.push(" ");_output.push({tag: ["i", {"class": "bi bi-file-earmark fs-1 text-success"}, false]}); _output.push(""); _output.push(" ");_output.push({tag: ["div", {"class": "mt-2", "id": "file_name" + ":" + this._cid, "data-id": "file_name"}, false]}); _output.push(""); _output.push(" ");_output.push({tag: ["div", {"class": "text-muted small", "id": "file_size" + ":" + this._cid, "data-id": "file_size"}, false]}); _output.push(""); _output.push(" "); _output.push({comp: ["Button_Secondary", {"id": "remove_btn" + ":" + this._cid, "data-id": "remove_btn", "class": "mt-2"}, function(Button_Secondary) { let _output = []; _output.push("Remove"); return [_output, this]; }.bind(this)]}); _output.push(" "); _output.push(""); _output.push({tag: ["div", {"id": "progress" + ":" + this._cid, "data-id": "progress", "style": "display: none;"}, false]}); _output.push(" "); _output.push({comp: ["Progress_Bar", {"id": "progress_bar" + ":" + this._cid, "data-id": "progress_bar"}]}); _output.push(" ");_output.push({tag: ["div", {"class": "text-muted small mt-2"}, false]}); _output.push("Uploading..."); _output.push(""); _output.push(" "); _output.push(""); _output.push(""); if (this.args.help) { _output.push(" ");_output.push({tag: ["div", {"class": "form-text"}, false]}); (() => { const result = this.args.help ; if (Array.isArray(result)) { if (result.length === 2 && Array.isArray(result[0])) { _output.push(...result[0]); } else { _output.push(...result); } } else { _output.push(jqhtml.escape_html(result)); } })(); _output.push(""); _output.push(" "); } _output.push(" "); return [_output, this]; }, dependencies: [] }; // Self-register with jqhtml runtime // Must use window.jqhtml since we're in bundle scope if (!window.jqhtml) { throw new Error('FATAL: window.jqhtml is not defined. The jqhtml runtime must be loaded before registering templates.'); } // Auto-register following standard jqhtml pattern window.jqhtml.register_template(template_File_Upload); })(); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3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