├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── cards.py ├── database.py ├── main.py ├── requirements.txt ├── screenshot.png └── static ├── DragDropTouch.js ├── edit_icon.svg ├── index.html ├── kanban.js ├── plus_icon.svg └── vue.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore SQLite DB files 2 | *.db 3 | 4 | # Ignore vim tmp files 5 | *.swp 6 | 7 | # Byte-compiled / optimized / DLL files 8 | __pycache__/ 9 | *.py[cod] 10 | *$py.class 11 | 12 | # C extensions 13 | *.so 14 | 15 | # Distribution / packaging 16 | .Python 17 | env/ 18 | build/ 19 | develop-eggs/ 20 | dist/ 21 | downloads/ 22 | eggs/ 23 | .eggs/ 24 | lib/ 25 | lib64/ 26 | parts/ 27 | sdist/ 28 | var/ 29 | wheels/ 30 | *.egg-info/ 31 | .installed.cfg 32 | *.egg 33 | 34 | # PyInstaller 35 | # Usually these files are written by a python script from a template 36 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 37 | *.manifest 38 | *.spec 39 | 40 | # Installer logs 41 | pip-log.txt 42 | pip-delete-this-directory.txt 43 | 44 | # Unit test / coverage reports 45 | htmlcov/ 46 | .tox/ 47 | .coverage 48 | .coverage.* 49 | .cache 50 | nosetests.xml 51 | coverage.xml 52 | *.cover 53 | .hypothesis/ 54 | 55 | # Translations 56 | *.mo 57 | *.pot 58 | 59 | # Django stuff: 60 | *.log 61 | local_settings.py 62 | 63 | # Flask stuff: 64 | instance/ 65 | .webassets-cache 66 | 67 | # Scrapy stuff: 68 | .scrapy 69 | 70 | # Sphinx documentation 71 | docs/_build/ 72 | 73 | # PyBuilder 74 | target/ 75 | 76 | # Jupyter Notebook 77 | .ipynb_checkpoints 78 | 79 | # pyenv 80 | .python-version 81 | 82 | # celery beat schedule file 83 | celerybeat-schedule 84 | 85 | # SageMath parsed files 86 | *.sage.py 87 | 88 | # dotenv 89 | .env 90 | 91 | # virtualenv 92 | .venv 93 | venv/ 94 | ENV/ 95 | 96 | # Spyder project settings 97 | .spyderproject 98 | .spyproject 99 | 100 | # Rope project settings 101 | .ropeproject 102 | 103 | # mkdocs documentation 104 | /site 105 | 106 | # mypy 107 | .mypy_cache/ 108 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Run with: 2 | # podman run -it --publish 8080:8080 --volume kanban.db:kanban.db 3 | # 4 | FROM ubuntu:24.04 5 | 6 | RUN apt update -y && \ 7 | apt install python3 python3-waitress python3-flask python3-flask-sqlalchemy \ 8 | --no-install-recommends -y && \ 9 | apt clean 10 | WORKDIR /python-kanban 11 | 12 | copy *.py . 13 | copy static ./static 14 | EXPOSE 8080 15 | 16 | CMD waitress-serve --call 'main:create_app' 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Python Kanban Board 2 | 3 | A simple Kanban board application using [Flask][flask-home] and [SQLite][sqlite-home]. 4 | 5 | ![Kanban Board screenshot](screenshot.png) 6 | 7 | --- 8 | 9 | ## Table of Contents 10 | 11 | - [Running Locally](#running-locally) 12 | - [Overview](#overview) 13 | - [Project Structure](#project-structure) 14 | - [How It Works](#how-it-works) 15 | - [Safe Code Modifications](#safe-code-modifications) 16 | - [Database Requirements](#database-requirements) 17 | - [Integrating Into Other Projects](#integrating-into-other-projects) 18 | - [License](#license) 19 | 20 | --- 21 | 22 | ## Running Locally 23 | 24 | The application can be run with the following steps: 25 | 26 | 1. **Install required python packages**: 27 | 28 | ```bash 29 | pip install -r requirements.txt 30 | ``` 31 | 32 | > **Note**: this will install packages globally. To avoid changing the system packages, the [venv module][venv-docs] can be used to set up a virtual environment. 33 | 34 | 2. **Run the application using `flask`**: 35 | 36 | ```bash 37 | FLASK_APP=main.py flask run 38 | ``` 39 | 40 | 3. Finally, connect to [http://127.0.0.1:5000/](http://127.0.0.1:5000/) in a web browser. 41 | 42 | --- 43 | 44 | ## Overview 45 | 46 | This is a simple Kanban board application built using Flask and SQLite. The application allows users to create, update, delete, and reorder cards within predefined columns on a Kanban board. 47 | 48 | --- 49 | 50 | ## Project Structure 51 | 52 | The project consists of three main files: 53 | 54 | 1. **`main.py`** – The core application logic and route definitions. 55 | 2. **`cards.py`** – The model and functions for managing Kanban cards. 56 | 3. **`database.py`** – Handles the database instance using SQLAlchemy. 57 | 58 | --- 59 | 60 | ## How It Works 61 | 62 | ### `main.py` 63 | 64 | This file sets up the Flask application and handles routes for card management. 65 | 66 | - **Routes**: 67 | - `/`: Return Kanban board index page 68 | - `/static/`: Return static files from the `static` directory (CSS, JS etc) 69 | - `/cards`: Returns all cards in JSON format. 70 | - `/columns`: Returns available columns. 71 | - `/card`: POST endpoint to create a new card. 72 | - `/card/`: PUT to update or DELETE to delete a card. 73 | - `/card/reorder`: POST to reorder cards within the board. 74 | 75 | ### `cards.py` 76 | 77 | This file contains the **Card** model and its associated functions. It includes creating, updating, deleting, and reordering cards. 78 | 79 | - **Key Functions**: 80 | - `all_cards()`: Fetch all cards, sorted by `sort_order`. 81 | - `create_card()`: Create a new card with optional fields like color and column. 82 | - `update_card()`: Update an existing card's attributes. 83 | - `delete_card()`: Delete a card. 84 | - `order_cards()`: Reorder a card in the list. 85 | 86 | The **Card** model is defined with attributes like `id`, `text`, `column`, `color`, `modified`, `archived`, and `sort_order`. Cards are uniquely identified by `id`, and columns specify the status of a card. 87 | 88 | ### `database.py` 89 | 90 | This file initializes the SQLAlchemy instance and connects to an SQLite database. The configuration is flexible to accommodate different databases as needed. 91 | 92 | --- 93 | 94 | ## Safe Code Modifications 95 | 96 | ### Key Variables 97 | 98 | - **`id`**: Unique identifier for each card (primary key). 99 | - **`text`**: The content of the card (free text). 100 | - **`column`**: Defines which column the card belongs to (predefined options). 101 | - **`color`**: Color of the card, in `#RRGGBB` format. 102 | - **`modified`**: Auto-updated timestamp when a card is modified. 103 | - **`archived`**: Boolean indicating if a card is archived. 104 | - **`sort_order`**: Determines the order in which cards are displayed in each column. 105 | 106 | ### Key Considerations 107 | 108 | - The `id` field must be unique. 109 | - Ensure the `column` value is valid (exists in the list of predefined columns set by the `kanban.columns` config option). 110 | 111 | --- 112 | 113 | ## Database Requirements 114 | 115 | The application uses **SQLite** managed through **SQLAlchemy**. The main table `Card` includes the following columns: 116 | 117 | | Column | Type | Description | 118 | |-------------|--------------|------------------------------------------------| 119 | | id | Integer (PK) | Primary key for each card | 120 | | text | String(120) | The card's content | 121 | | column | String(120) | The card's column (e.g., "To Do", "Done") | 122 | | color | String(7) | Color code in `#RRGGBB` format | 123 | | modified | DateTime | Last modification timestamp | 124 | | archived | Boolean | Indicates if the card is archived | 125 | | sort_order | Integer | Order of the card within the column | 126 | 127 | --- 128 | 129 | ## Integrating Into Other Projects 130 | 131 | To integrate this Kanban board into another project: 132 | 133 | ### 1. **Setup Flask and SQLAlchemy** 134 | 135 | Ensure Flask and SQLAlchemy are installed. You can use the following: 136 | 137 | ```bash 138 | pip install flask sqlalchemy 139 | ``` 140 | 141 | ### 2. **Database Configuration** 142 | 143 | Ensure that the `SQLALCHEMY_DATABASE_URI` in your project points to a valid database: 144 | 145 | ```python 146 | app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///your_project.db' 147 | ``` 148 | 149 | ### 3. **Models and Routes** 150 | 151 | Integrate the `Card` model and the routes from `main.py`. 152 | 153 | --- 154 | 155 | ## License 156 | 157 | With the exception of the following, all code in this repository is released under the terms of the [GNU General Public License v3][gpl-v3]: 158 | 159 | - [Plus][plus-icon] and [Edit][edit-icon] icons were created by Andrian Valeanu, and are available under the [Creative Commons (CC BY-NC 3.0)][cc-by-nc-3.0] license. 160 | - [Vue.js][vuejs-home] is released under the [MIT License][mit-license]. 161 | - [DragDropTouch][dragdroptouch-home] is released under the [MIT License][mit-license]. 162 | 163 | --- 164 | 165 | [cc-by-nc-3.0]: https://creativecommons.org/licenses/by-nc/3.0/ 166 | [dragdroptouch-home]: https://github.com/Bernardo-Castilho/dragdroptouch 167 | [edit-icon]: https://www.iconfinder.com/icons/103173/edit_new_write_icon 168 | [flask-home]: http://flask.pocoo.org/ 169 | [gpl-v3]: https://www.gnu.org/licenses/gpl-3.0.en.html 170 | [mit-license]: https://opensource.org/licenses/MIT 171 | [plus-icon]: https://www.iconfinder.com/icons/103172/add_plus_icon 172 | [sqlite-home]: https://www.sqlite.org/ 173 | [venv-docs]: https://docs.python.org/3/library/venv.html 174 | [vuejs-home]: https://vuejs.org/ 175 | -------------------------------------------------------------------------------- /cards.py: -------------------------------------------------------------------------------- 1 | """Card model and controller""" 2 | 3 | from datetime import datetime, timezone 4 | from database import db 5 | 6 | class Card(db.Model): # pylint: disable=too-few-public-methods 7 | """SQLAlchemy card class""" 8 | id = db.Column(db.Integer, primary_key=True) # pylint: disable=C0103 9 | text = db.Column(db.String(120)) 10 | column = db.Column(db.String(120), default="To Do") 11 | color = db.Column(db.String(7), default='#dddddd') 12 | modified = db.Column(db.DateTime, default=datetime.utcnow) 13 | archived = db.Column(db.Boolean, default=False) 14 | sort_order = db.Column(db.Integer, default=0) 15 | 16 | def __repr__(self): 17 | """Return a string representation of a card""" 18 | return '' % (self.id, self.text) 19 | 20 | def json(self): 21 | """Return a JSON representation of a card""" 22 | return { 23 | 'id': self.id, 24 | 'text': self.text, 25 | 'column': self.column, 26 | 'color': self.color, 27 | 'modified': self.modified.replace(tzinfo=timezone.utc).isoformat(), 28 | 'archived': self.archived, 29 | } 30 | 31 | def all_cards(): 32 | """Return JSON for all cards, sorted by the order_by attribute""" 33 | return [card.json() for card in Card.query.order_by(Card.sort_order.asc()).all()] 34 | 35 | def create_card(text, **kwargs): 36 | """Create a new card""" 37 | # TODO: handle missing values 38 | db.session.add(Card(text=text, **kwargs)) 39 | db.session.commit() 40 | 41 | def delete_card(card_id): 42 | """Delete a card""" 43 | # TODO: handle missing values 44 | db.session.delete(Card.query.get(card_id)) 45 | db.session.commit() 46 | 47 | def order_cards(data): 48 | """Reposition a specified card""" 49 | 50 | # TODO: handle missing 'card' property 51 | card_id = data['card'] 52 | before_id = data.get('before', 'all') 53 | 54 | cards = Card.query.order_by(Card.sort_order.asc()).all() 55 | 56 | card = next(card for card in cards if card.id == card_id) 57 | 58 | if before_id is None: 59 | # move to end 60 | cards.append(cards.pop(cards.index(card))) 61 | elif before_id == 'all': 62 | # move to start 63 | cards.insert(0, cards.pop(cards.index(card))) 64 | else: 65 | before_card = next(card for card in cards if card.id == before_id) 66 | moving_card = cards.pop(cards.index(card)) 67 | new_index = cards.index(before_card) 68 | cards.insert(new_index, moving_card) 69 | 70 | for i, card in enumerate(cards): 71 | card.sort_order = i #len(cards) - i 72 | 73 | db.session.commit() 74 | 75 | def update_card(card_id, json, columns): 76 | """Update an existing card""" 77 | card = Card.query.get(card_id) 78 | 79 | modified = False 80 | 81 | if 'text' in json: 82 | modified = True 83 | card.text = json['text'] 84 | 85 | if 'color' in json: 86 | modified = True 87 | card.color = json['color'] 88 | 89 | if 'column' in json: 90 | if json['column'] in columns: 91 | modified = True 92 | card.column = json['column'] 93 | else: 94 | raise Exception("Invalid column name: %s" % json['column']) 95 | 96 | if 'archived' in json: 97 | modified = True 98 | card.archived = json['archived'] 99 | 100 | if modified: 101 | card.modified = datetime.utcnow() 102 | 103 | db.session.commit() 104 | -------------------------------------------------------------------------------- /database.py: -------------------------------------------------------------------------------- 1 | """SQLAlchemy DB instance""" 2 | from flask_sqlalchemy import SQLAlchemy 3 | db = SQLAlchemy() 4 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | #/usr/bin/env python 2 | 3 | """A simple Kanban board application using Flask and SQLLite""" 4 | 5 | from flask import Flask, send_from_directory, request, abort 6 | from flask.json import jsonify 7 | 8 | from database import db 9 | import cards 10 | 11 | def create_app(): 12 | """Create a new instance of the flask app""" 13 | app = Flask(__name__) 14 | app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///kanban.db' 15 | app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False 16 | app.config['kanban.columns'] = ['To Do', 'Doing', 'Done'] 17 | db.init_app(app) 18 | app.app_context().push() 19 | db.create_all() 20 | 21 | @app.route('/') 22 | def index(): 23 | """Serve the main index page""" 24 | return send_from_directory('static', 'index.html') 25 | 26 | @app.route('/static/') 27 | def static_file(path): 28 | """Serve files from the static directory""" 29 | return send_from_directory('static', path) 30 | 31 | @app.route('/cards') 32 | def get_cards(): 33 | """Get an order list of cards""" 34 | return jsonify(cards.all_cards()) 35 | 36 | @app.route('/columns') 37 | def get_columns(): 38 | """Get all valid columns""" 39 | return jsonify(app.config.get('kanban.columns')) 40 | 41 | @app.route('/card', methods=['POST']) 42 | def create_card(): 43 | """Create a new card""" 44 | 45 | # TODO: validation 46 | cards.create_card( 47 | text=request.form.get('text'), 48 | column=request.form.get('column', app.config.get('kanban.columns')[0]), 49 | color=request.form.get('color', None), 50 | ) 51 | 52 | # TODO: handle errors 53 | return 'Success' 54 | 55 | @app.route('/card/reorder', methods=["POST"]) 56 | def order_cards(): 57 | """Reorder cards by moving a single card 58 | 59 | The JSON payload should have a 'card' and 'before' attributes where card is 60 | the card ID to move and before is the card id it should be moved in front 61 | of. For example: 62 | 63 | { 64 | "card": 3, 65 | "before": 5, 66 | } 67 | 68 | "before" may also be "all" or null to move the card to the beginning or end 69 | of the list. 70 | """ 71 | 72 | if not request.is_json: 73 | abort(400) 74 | cards.order_cards(request.get_json()) 75 | return 'Success' 76 | 77 | 78 | @app.route('/card/', methods=['PUT']) 79 | def update_card(card_id): 80 | """Update an existing card, the JSON payload may be partial""" 81 | if not request.is_json: 82 | abort(400) 83 | 84 | # TODO: handle errors 85 | cards.update_card(card_id, request.get_json(), app.config.get('kanban.columns')) 86 | 87 | return 'Success' 88 | 89 | @app.route('/card/', methods=['DELETE']) 90 | def delete_card(card_id): 91 | """Delete a card by ID""" 92 | 93 | # TODO: handle errors 94 | cards.delete_card(card_id) 95 | return 'Success' 96 | 97 | return app 98 | 99 | if __name__ == '__main__': 100 | create_app().run(debug=True) 101 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | blinker==1.8.2 2 | click==8.1.7 3 | Flask==2.3.2 4 | Flask-SQLAlchemy==3.0.5 5 | greenlet==3.0.3 6 | itsdangerous==2.2.0 7 | Jinja2==3.1.5 8 | MarkupSafe==2.1.5 9 | SQLAlchemy==2.0.30 10 | typing_extensions==4.11.0 11 | Werkzeug==3.0.6 12 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FloatingOctothorpe/python-kanban/bc945bf5e6b22a27a38b06e32d9341d93a1e1eb8/screenshot.png -------------------------------------------------------------------------------- /static/DragDropTouch.js: -------------------------------------------------------------------------------- 1 | let DragDropTouch; 2 | (function (DragDropTouch_1) { 3 | 'use strict'; 4 | /** 5 | * Object used to hold the data that is being dragged during drag and drop operations. 6 | * 7 | * It may hold one or more data items of different types. For more information about 8 | * drag and drop operations and data transfer objects, see 9 | * HTML Drag and Drop API. 10 | * 11 | * This object is created automatically by the @see:DragDropTouch singleton and is 12 | * accessible through the @see:dataTransfer property of all drag events. 13 | */ 14 | let DataTransfer = (function () { 15 | function DataTransfer() { 16 | this._dropEffect = 'move'; 17 | this._effectAllowed = 'all'; 18 | this._data = {}; 19 | } 20 | Object.defineProperty(DataTransfer.prototype, "dropEffect", { 21 | /** 22 | * Gets or sets the type of drag-and-drop operation currently selected. 23 | * The value must be 'none', 'copy', 'link', or 'move'. 24 | */ 25 | get: function () { 26 | return this._dropEffect; 27 | }, 28 | set: function (value) { 29 | this._dropEffect = value; 30 | }, 31 | enumerable: true, 32 | configurable: true 33 | }); 34 | Object.defineProperty(DataTransfer.prototype, "effectAllowed", { 35 | /** 36 | * Gets or sets the types of operations that are possible. 37 | * Must be one of 'none', 'copy', 'copyLink', 'copyMove', 'link', 38 | * 'linkMove', 'move', 'all' or 'uninitialized'. 39 | */ 40 | get: function () { 41 | return this._effectAllowed; 42 | }, 43 | set: function (value) { 44 | this._effectAllowed = value; 45 | }, 46 | enumerable: true, 47 | configurable: true 48 | }); 49 | Object.defineProperty(DataTransfer.prototype, "types", { 50 | /** 51 | * Gets an array of strings giving the formats that were set in the @see:dragstart event. 52 | */ 53 | get: function () { 54 | return Object.keys(this._data); 55 | }, 56 | enumerable: true, 57 | configurable: true 58 | }); 59 | /** 60 | * Removes the data associated with a given type. 61 | * 62 | * The type argument is optional. If the type is empty or not specified, the data 63 | * associated with all types is removed. If data for the specified type does not exist, 64 | * or the data transfer contains no data, this method will have no effect. 65 | * 66 | * @param type Type of data to remove. 67 | */ 68 | DataTransfer.prototype.clearData = function (type) { 69 | if (type !== null) { 70 | delete this._data[type.toLowerCase()]; 71 | } 72 | else { 73 | this._data = {}; 74 | } 75 | }; 76 | /** 77 | * Retrieves the data for a given type, or an empty string if data for that type does 78 | * not exist or the data transfer contains no data. 79 | * 80 | * @param type Type of data to retrieve. 81 | */ 82 | DataTransfer.prototype.getData = function (type) { 83 | let lcType = type.toLowerCase(), 84 | data = this._data[lcType]; 85 | if (lcType === "text" && data == null) { 86 | data = this._data["text/plain"]; // getData("text") also gets ("text/plain") 87 | } 88 | return data || ""; 89 | }; 90 | /** 91 | * Set the data for a given type. 92 | * 93 | * For a list of recommended drag types, please see 94 | * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Recommended_Drag_Types. 95 | * 96 | * @param type Type of data to add. 97 | * @param value Data to add. 98 | */ 99 | DataTransfer.prototype.setData = function (type, value) { 100 | this._data[type.toLowerCase()] = value; 101 | }; 102 | /** 103 | * Set the image to be used for dragging if a custom one is desired. 104 | * 105 | * @param img An image element to use as the drag feedback image. 106 | * @param offsetX The horizontal offset within the image. 107 | * @param offsetY The vertical offset within the image. 108 | */ 109 | DataTransfer.prototype.setDragImage = function (img, offsetX, offsetY) { 110 | let ddt = DragDropTouch._instance; 111 | ddt._imgCustom = img; 112 | ddt._imgOffset = { x: offsetX, y: offsetY }; 113 | }; 114 | return DataTransfer; 115 | }()); 116 | DragDropTouch_1.DataTransfer = DataTransfer; 117 | /** 118 | * Defines a class that adds support for touch-based HTML5 drag/drop operations. 119 | * 120 | * The @see:DragDropTouch class listens to touch events and raises the 121 | * appropriate HTML5 drag/drop events as if the events had been caused 122 | * by mouse actions. 123 | * 124 | * The purpose of this class is to enable using existing, standard HTML5 125 | * drag/drop code on mobile devices running IOS or Android. 126 | * 127 | * To use, include the DragDropTouch.js file on the page. The class will 128 | * automatically start monitoring touch events and will raise the HTML5 129 | * drag drop events (dragstart, dragenter, dragleave, drop, dragend) which 130 | * should be handled by the application. 131 | * 132 | * For details and examples on HTML drag and drop, see 133 | * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Drag_operations. 134 | */ 135 | let DragDropTouch = (function () { 136 | /** 137 | * Initializes the single instance of the @see:DragDropTouch class. 138 | */ 139 | function DragDropTouch() { 140 | this._lastClick = 0; 141 | // enforce singleton pattern 142 | if (DragDropTouch._instance) { 143 | throw 'DragDropTouch instance already created.'; 144 | } 145 | // detect passive event support 146 | // https://github.com/Modernizr/Modernizr/issues/1894 147 | let supportsPassive = false; 148 | document.addEventListener('test', function () { }, { 149 | get passive() { 150 | supportsPassive = true; 151 | return true; 152 | } 153 | }); 154 | // listen to touch events 155 | if (navigator.maxTouchPoints) { 156 | let d = document, 157 | ts = this._touchstart.bind(this), 158 | tm = this._touchmove.bind(this), 159 | te = this._touchend.bind(this), 160 | opt = supportsPassive ? { passive: false, capture: false } : false; 161 | d.addEventListener('touchstart', ts, opt); 162 | d.addEventListener('touchmove', tm, opt); 163 | d.addEventListener('touchend', te); 164 | d.addEventListener('touchcancel', te); 165 | } 166 | } 167 | /** 168 | * Gets a reference to the @see:DragDropTouch singleton. 169 | */ 170 | DragDropTouch.getInstance = function () { 171 | return DragDropTouch._instance; 172 | }; 173 | // ** event handlers 174 | DragDropTouch.prototype._touchstart = function (e) { 175 | let _this = this; 176 | if (this._shouldHandle(e)) { 177 | // clear all variables 178 | this._reset(); 179 | // get nearest draggable element 180 | let src = this._closestDraggable(e.target); 181 | if (src) { 182 | // give caller a chance to handle the hover/move events 183 | if (!this._dispatchEvent(e, 'mousemove', e.target) && 184 | !this._dispatchEvent(e, 'mousedown', e.target)) { 185 | // get ready to start dragging 186 | this._dragSource = src; 187 | this._ptDown = this._getPoint(e); 188 | this._lastTouch = e; 189 | 190 | // do not prevent default (so input elements keep working) 191 | //e.preventDefault(); 192 | 193 | // show context menu if the user hasn't started dragging after a while 194 | setTimeout(function () { 195 | if (_this._dragSource === src && _this._img === null) { 196 | if (_this._dispatchEvent(e, 'contextmenu', src)) { 197 | _this._reset(); 198 | } 199 | } 200 | }, DragDropTouch._CTXMENU); 201 | if (DragDropTouch._ISPRESSHOLDMODE) { 202 | this._pressHoldInterval = setTimeout(function () { 203 | _this._isDragEnabled = true; 204 | _this._touchmove(e); 205 | }, DragDropTouch._PRESSHOLDAWAIT); 206 | } 207 | } 208 | } 209 | } 210 | }; 211 | DragDropTouch.prototype._touchmove = function (e) { 212 | if (this._shouldCancelPressHoldMove(e)) { 213 | this._reset(); 214 | return; 215 | } 216 | if (this._shouldHandleMove(e) || this._shouldHandlePressHoldMove(e)) { 217 | // see if target wants to handle move 218 | let target = this._getTarget(e); 219 | if (this._dispatchEvent(e, 'mousemove', target)) { 220 | this._lastTouch = e; 221 | e.preventDefault(); 222 | return; 223 | } 224 | // start dragging 225 | if (this._dragSource && !this._img && this._shouldStartDragging(e)) { 226 | if (this._dispatchEvent(this._lastTouch, 'dragstart', this._dragSource)) { 227 | // target canceled the drag event 228 | this._dragSource = null; 229 | return; 230 | } 231 | this._createImage(e); 232 | this._dispatchEvent(e, 'dragenter', target); 233 | } 234 | // continue dragging 235 | if (this._img) { 236 | this._lastTouch = e; 237 | e.preventDefault(); // prevent scrolling 238 | this._dispatchEvent(e, 'drag', this._dragSource); 239 | if (target !== this._lastTarget) { 240 | this._dispatchEvent(this._lastTouch, 'dragleave', this._lastTarget); 241 | this._dispatchEvent(e, 'dragenter', target); 242 | this._lastTarget = target; 243 | } 244 | this._moveImage(e); 245 | this._isDropZone = this._dispatchEvent(e, 'dragover', target); 246 | } 247 | } 248 | }; 249 | DragDropTouch.prototype._touchend = function (e) { 250 | if (this._shouldHandle(e)) { 251 | // see if target wants to handle up 252 | if (this._dispatchEvent(this._lastTouch, 'mouseup', e.target)) { 253 | e.preventDefault(); 254 | return; 255 | } 256 | // user clicked the element but didn't drag, so clear the source and simulate a click 257 | if (!this._img) { 258 | this._dragSource = null; 259 | this._dispatchEvent(this._lastTouch, 'click', e.target); 260 | this._lastClick = Date.now(); 261 | } 262 | // finish dragging 263 | this._destroyImage(); 264 | if (this._dragSource) { 265 | if (e.type.indexOf('cancel') < 0 && this._isDropZone) { 266 | this._dispatchEvent(this._lastTouch, 'drop', this._lastTarget); 267 | } 268 | this._dispatchEvent(this._lastTouch, 'dragend', this._dragSource); 269 | this._reset(); 270 | } 271 | } 272 | }; 273 | // ** utilities 274 | // ignore events that have been handled or that involve more than one touch 275 | DragDropTouch.prototype._shouldHandle = function (e) { 276 | return e && 277 | !e.defaultPrevented && 278 | e.touches && e.touches.length < 2; 279 | }; 280 | 281 | // use regular condition outside of press & hold mode 282 | DragDropTouch.prototype._shouldHandleMove = function (e) { 283 | return !DragDropTouch._ISPRESSHOLDMODE && this._shouldHandle(e); 284 | }; 285 | 286 | // allow to handle moves that involve many touches for press & hold 287 | DragDropTouch.prototype._shouldHandlePressHoldMove = function (e) { 288 | return DragDropTouch._ISPRESSHOLDMODE && 289 | this._isDragEnabled && e && e.touches && e.touches.length; 290 | }; 291 | 292 | // reset data if user drags without pressing & holding 293 | DragDropTouch.prototype._shouldCancelPressHoldMove = function (e) { 294 | return DragDropTouch._ISPRESSHOLDMODE && !this._isDragEnabled && 295 | this._getDelta(e) > DragDropTouch._PRESSHOLDMARGIN; 296 | }; 297 | 298 | // start dragging when specified delta is detected 299 | DragDropTouch.prototype._shouldStartDragging = function (e) { 300 | let delta = this._getDelta(e); 301 | return delta > DragDropTouch._THRESHOLD || 302 | (DragDropTouch._ISPRESSHOLDMODE && delta >= DragDropTouch._PRESSHOLDTHRESHOLD); 303 | } 304 | 305 | // clear all members 306 | DragDropTouch.prototype._reset = function () { 307 | this._destroyImage(); 308 | this._dragSource = null; 309 | this._lastTouch = null; 310 | this._lastTarget = null; 311 | this._ptDown = null; 312 | this._isDragEnabled = false; 313 | this._isDropZone = false; 314 | this._dataTransfer = new DataTransfer(); 315 | clearInterval(this._pressHoldInterval); 316 | }; 317 | // get point for a touch event 318 | DragDropTouch.prototype._getPoint = function (e, page) { 319 | if (e && e.touches) { 320 | e = e.touches[0]; 321 | } 322 | return { x: page ? e.pageX : e.clientX, y: page ? e.pageY : e.clientY }; 323 | }; 324 | // get distance between the current touch event and the first one 325 | DragDropTouch.prototype._getDelta = function (e) { 326 | if (DragDropTouch._ISPRESSHOLDMODE && !this._ptDown) { return 0; } 327 | let p = this._getPoint(e); 328 | return Math.abs(p.x - this._ptDown.x) + Math.abs(p.y - this._ptDown.y); 329 | }; 330 | // get the element at a given touch event 331 | DragDropTouch.prototype._getTarget = function (e) { 332 | let pt = this._getPoint(e), 333 | el = document.elementFromPoint(pt.x, pt.y); 334 | while (el && getComputedStyle(el).pointerEvents == 'none') { 335 | el = el.parentElement; 336 | } 337 | return el; 338 | }; 339 | // create drag image from source element 340 | DragDropTouch.prototype._createImage = function (e) { 341 | // just in case... 342 | if (this._img) { 343 | this._destroyImage(); 344 | } 345 | // create drag image from custom element or drag source 346 | let src = this._imgCustom || this._dragSource; 347 | this._img = src.cloneNode(true); 348 | this._copyStyle(src, this._img); 349 | this._img.style.top = this._img.style.left = '-9999px'; 350 | // if creating from drag source, apply offset and opacity 351 | if (!this._imgCustom) { 352 | let rc = src.getBoundingClientRect(), 353 | pt = this._getPoint(e); 354 | this._imgOffset = { x: pt.x - rc.left, y: pt.y - rc.top }; 355 | this._img.style.opacity = DragDropTouch._OPACITY.toString(); 356 | } 357 | // add image to document 358 | this._moveImage(e); 359 | document.body.appendChild(this._img); 360 | }; 361 | // dispose of drag image element 362 | DragDropTouch.prototype._destroyImage = function () { 363 | if (this._img && this._img.parentElement) { 364 | this._img.parentElement.removeChild(this._img); 365 | } 366 | this._img = null; 367 | this._imgCustom = null; 368 | }; 369 | // move the drag image element 370 | DragDropTouch.prototype._moveImage = function (e) { 371 | let _this = this; 372 | requestAnimationFrame(function () { 373 | if (_this._img) { 374 | let pt = _this._getPoint(e, true), 375 | s = _this._img.style; 376 | s.position = 'absolute'; 377 | s.pointerEvents = 'none'; 378 | s.zIndex = '999999'; 379 | s.left = Math.round(pt.x - _this._imgOffset.x) + 'px'; 380 | s.top = Math.round(pt.y - _this._imgOffset.y) + 'px'; 381 | } 382 | }); 383 | }; 384 | // copy properties from an object to another 385 | DragDropTouch.prototype._copyProps = function (dst, src, props) { 386 | for (let i = 0; i < props.length; i++) { 387 | let p = props[i]; 388 | dst[p] = src[p]; 389 | } 390 | }; 391 | DragDropTouch.prototype._copyStyle = function (src, dst) { 392 | // remove potentially troublesome attributes 393 | DragDropTouch._rmvAtts.forEach(function (att) { 394 | dst.removeAttribute(att); 395 | }); 396 | // copy canvas content 397 | if (src instanceof HTMLCanvasElement) { 398 | let cSrc = src, 399 | cDst = dst; 400 | cDst.width = cSrc.width; 401 | cDst.height = cSrc.height; 402 | cDst.getContext('2d').drawImage(cSrc, 0, 0); 403 | } 404 | // copy style (without transitions) 405 | let cs = getComputedStyle(src); 406 | for (let i = 0; i < cs.length; i++) { 407 | let key = cs[i]; 408 | if (key.indexOf('transition') < 0) { 409 | dst.style[key] = cs[key]; 410 | } 411 | } 412 | dst.style.pointerEvents = 'none'; 413 | // and repeat for all children 414 | for (let i = 0; i < src.children.length; i++) { 415 | this._copyStyle(src.children[i], dst.children[i]); 416 | } 417 | }; 418 | // compute missing offset or layer property for an event 419 | DragDropTouch.prototype._setOffsetAndLayerProps = function (e, target) { 420 | let rect = undefined; 421 | if (e.offsetX === undefined) { 422 | rect = target.getBoundingClientRect(); 423 | e.offsetX = e.clientX - rect.x; 424 | e.offsetY = e.clientY - rect.y; 425 | } 426 | if (e.layerX === undefined) { 427 | rect = rect || target.getBoundingClientRect(); 428 | e.layerX = e.pageX - rect.left; 429 | e.layerY = e.pageY - rect.top; 430 | } 431 | } 432 | DragDropTouch.prototype._dispatchEvent = function (e, type, target) { 433 | if (e && target) { 434 | //let evt = document.createEvent('Event'), t = e.touches ? e.touches[0] : e; // deprecated 435 | //evt.initEvent(type, true, true); // deprecated 436 | let evt = new Event(type, { bubbles: true, cancelable: true }), 437 | touch = e.touches ? e.touches[0] : e; 438 | evt.button = 0; 439 | evt.which = evt.buttons = 1; 440 | this._copyProps(evt, e, DragDropTouch._kbdProps); 441 | this._copyProps(evt, touch, DragDropTouch._ptProps); 442 | this._setOffsetAndLayerProps(evt, target); 443 | evt.dataTransfer = this._dataTransfer; 444 | target.dispatchEvent(evt); 445 | return evt.defaultPrevented; 446 | } 447 | return false; 448 | }; 449 | // gets an element's closest draggable ancestor 450 | // and elements are draggable by default 451 | DragDropTouch.prototype._closestDraggable = function (e) { 452 | for (; e; e = e.parentElement) { 453 | if (/*e.hasAttribute('draggable') &&*/ e.draggable) { 454 | return e; 455 | } 456 | } 457 | return null; 458 | }; 459 | return DragDropTouch; 460 | }()); 461 | /*private*/ DragDropTouch._instance = new DragDropTouch(); // singleton 462 | // constants 463 | DragDropTouch._THRESHOLD = 5; // pixels to move before drag starts 464 | DragDropTouch._OPACITY = 0.5; // drag image opacity 465 | DragDropTouch._DBLCLICK = 500; // max ms between clicks in a double click 466 | DragDropTouch._CTXMENU = 900; // ms to hold before raising 'contextmenu' event 467 | DragDropTouch._ISPRESSHOLDMODE = false; // decides of press & hold mode presence 468 | DragDropTouch._PRESSHOLDAWAIT = 400; // ms to wait before press & hold is detected 469 | DragDropTouch._PRESSHOLDMARGIN = 25; // pixels that finger might shiver while pressing 470 | DragDropTouch._PRESSHOLDTHRESHOLD = 0; // pixels to move before drag starts 471 | // copy styles/attributes from drag source to drag image element 472 | DragDropTouch._rmvAtts = 'id,class,style,draggable'.split(','); 473 | // synthesize and dispatch an event 474 | // returns true if the event has been handled (e.preventDefault == true) 475 | DragDropTouch._kbdProps = 'altKey,ctrlKey,metaKey,shiftKey'.split(','); 476 | DragDropTouch._ptProps = 'pageX,pageY,clientX,clientY,screenX,screenY,offsetX,offsetY'.split(','); 477 | DragDropTouch_1.DragDropTouch = DragDropTouch; 478 | })(DragDropTouch || (DragDropTouch = {})); 479 | -------------------------------------------------------------------------------- /static/edit_icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Kanban board 5 | 6 | 197 | 198 | 199 | 200 | 203 |
204 |
205 |

Kanban board

206 |
207 | 208 | 209 | 210 |
211 |
212 |
213 |
219 |

{{ column }}

220 | 221 |
  • 229 | 230 | edit 231 | 232 | #{{ card.id }} 233 |

    {{ card.text }}

    234 |

    Update {{ Math.floor((Date.now() - Date.parse(card.modified)) / (1000*60*60*24)) }} day(s) ago

    235 |
  • 236 | 237 |
    238 |
    239 |
    240 |
    241 | 242 | 243 |
    244 | 245 | 246 |
    247 | 248 |
    249 |
    250 |
    251 |
    252 | 253 | 254 | 255 | 256 |
    257 |
    258 |
    259 |
    260 | 261 | The source code for this site is available on GitHub. 263 | 264 |
    265 | 266 | 267 | 268 | 269 | -------------------------------------------------------------------------------- /static/kanban.js: -------------------------------------------------------------------------------- 1 | /* eslint-env es6 */ 2 | /* global Vue */ 3 | 4 | /* eslint indent: ["error", 2] */ 5 | /* exported app, dragstart_handler, dragover_handler, 6 | dragleave_handler, drop_handler */ 7 | /* eslint quote-props: ["error", "as-needed"] */ 8 | /* eslint func-names: ["error", "never"] */ 9 | /* eslint id-length: ["error", { "exceptions": ["i"] }] */ 10 | /* eslint no-magic-numbers: ["error", { "ignore": [0, 1] }] */ 11 | 12 | window.app = new Vue({ 13 | data: { 14 | cards: [], 15 | columns: [], 16 | edit_card: null, 17 | show_archived_cards: false, 18 | show_card_ids: false, 19 | show_card_timestamps: false 20 | }, 21 | el: "#kanban", 22 | methods: { 23 | cancel_card_edit: function () { 24 | this.edit_card = null; 25 | }, 26 | complete_card_edit: function (card_id) { 27 | if (this.edit_card) { 28 | this.edit_card.text = this.$refs.card_edit_text.value; 29 | this.edit_card.color = this.$refs.card_edit_color.value; 30 | this.edit_card.archived = this.$refs.card_edit_archive.checked; 31 | this.update_card(card_id); 32 | this.edit_card = null; 33 | } 34 | }, 35 | create_card: function (ev) { 36 | let vue_app = this; 37 | let form = ev.target; 38 | let form_color = form.color.value; 39 | 40 | fetch(form.action, { 41 | method: 'POST', 42 | body: new FormData(form) 43 | }).then(function () { 44 | vue_app.refresh_cards(); 45 | form.reset(); 46 | vue_app.$refs.new_card_color.value = form_color; 47 | }); 48 | }, 49 | delete_card: function (card_id) { 50 | let vue_app = this; 51 | 52 | if (window.confirm("Delete card?")) { 53 | fetch("card/" + card_id, { 54 | method: 'DELETE' 55 | }).then(function () { 56 | for (let i = 0; i < vue_app.cards.length; i += 1) { 57 | if (vue_app.cards[i].id === card_id) { 58 | vue_app.edit_card = null; 59 | delete vue_app.cards[i]; 60 | vue_app.cards.splice(i, 1); 61 | 62 | return; 63 | } 64 | } 65 | }); 66 | } 67 | }, 68 | get_card: function (id) { 69 | let target = id; 70 | 71 | if (typeof target === "string") { 72 | target = parseInt(target.replace("card", ""), 10); 73 | } 74 | for (let i = 0; i < this.cards.length; i += 1) { 75 | if (this.cards[i].id === target) { 76 | return this.cards[i]; 77 | } 78 | } 79 | }, 80 | handle_card_edit_click: function (ev) { 81 | if (ev.target === this.$refs.card_edit_container) { 82 | this.edit_card = null; 83 | } 84 | }, 85 | refresh_cards: function () { 86 | let vue_app = this; 87 | 88 | fetch("cards") 89 | .then(response => response.json()) 90 | .then(response => { vue_app.cards = response; }); 91 | }, 92 | refresh_columns: function () { 93 | let vue_app = this; 94 | 95 | fetch("columns") 96 | .then(response => response.json()) 97 | .then(response => { 98 | vue_app.columns = response; 99 | document.documentElement.style.setProperty( 100 | "--kanban-columns", 101 | vue_app.columns.length 102 | ); 103 | }); 104 | }, 105 | start_card_edit: function (card_id) { 106 | this.edit_card = this.get_card(card_id); 107 | 108 | let vue_app = this; 109 | 110 | Vue.nextTick(function () { 111 | vue_app.$refs.card_edit_text.value = vue_app.edit_card.text; 112 | vue_app.$refs.card_edit_text.focus(); 113 | vue_app.$refs.card_edit_text.select(); 114 | }); 115 | }, 116 | update_card: function (id) { 117 | let card = this.get_card(id); 118 | fetch("card/" + card.id, { 119 | method: 'PUT', 120 | headers: {'Content-Type': 'application/json'}, 121 | body: JSON.stringify(card) 122 | }); 123 | }, 124 | update_card_color: function (card_id, ev) { 125 | this.get_card(card_id).color = ev.target.value; 126 | this.update_card(card_id); 127 | }, 128 | init: function () { 129 | this.refresh_columns(); 130 | this.refresh_cards(); 131 | this.$refs.new_card_color.value = getComputedStyle(document.documentElement).getPropertyValue("--default-card-color").replace(/ /g, ""); 132 | } 133 | } 134 | }); 135 | 136 | function dragstart_handler (ev) { 137 | // Add the target element's id to the data transfer object 138 | ev.dataTransfer.setData("text/plain", ev.target.id); 139 | ev.dropEffect = "move"; 140 | } 141 | 142 | function dragover_handler (ev) { 143 | ev.preventDefault(); 144 | // Set the dropEffect to move 145 | ev.dataTransfer.dropEffect = "move"; 146 | 147 | let container = ev.target; 148 | 149 | while (container.tagName !== "SECTION") { 150 | container = container.parentElement; 151 | } 152 | 153 | if (!container.classList.contains("drop-target")) { 154 | container.classList.add("drop-target"); 155 | } 156 | } 157 | 158 | function dragleave_handler (ev) { 159 | let container = ev.target; 160 | 161 | while (container.tagName !== "SECTION") { 162 | container = container.parentElement; 163 | } 164 | container.classList.remove("drop-target"); 165 | } 166 | 167 | function drop_handler (ev) { 168 | ev.preventDefault(); 169 | 170 | // TODO: handle invalid card ID 171 | let card = window.app.get_card(ev.dataTransfer.getData("text")); 172 | let container = ev.target; 173 | 174 | while (container.tagName !== "SECTION") { 175 | container = container.parentElement; 176 | } 177 | container.classList.remove("drop-target"); 178 | 179 | let new_col = container.getElementsByTagName("h2")[0].textContent; 180 | let column_cards = container.getElementsByTagName("li"); 181 | let moving_down = false; 182 | let before_id = null; 183 | 184 | for (let i = 0; i < column_cards.length; i += 1) { 185 | if (parseInt(column_cards[i].id.replace("card", ""), 10) === card.id) { 186 | moving_down = true; 187 | } 188 | 189 | let event_absolute_y = ev.y + document.documentElement.scrollTop; 190 | 191 | // Mouse above list 192 | if (column_cards[i].offsetTop > event_absolute_y) { 193 | before_id = "all"; 194 | break; 195 | // On list item 196 | } else if (i < (column_cards.length - 1) && event_absolute_y <= column_cards[i + 1].offsetTop) { 197 | if (moving_down) { 198 | before_id = parseInt(column_cards[i + 1].id.replace("card", ""), 10); 199 | } else { 200 | before_id = parseInt(column_cards[i].id.replace("card", ""), 10); 201 | } 202 | break; 203 | } else if (i === (column_cards.length - 1)) { 204 | // On last list item 205 | if (event_absolute_y < column_cards[i].offsetTop + (column_cards[i].offsetHeight) && card.column !== new_col) { 206 | before_id = parseInt(column_cards[i].id.replace("card", ""), 10); 207 | // Past the end 208 | } else { 209 | before_id = null; 210 | } 211 | } 212 | } 213 | if (column_cards.length > 0 && card.id !== before_id) { 214 | fetch("card/reorder", { 215 | method: 'POST', 216 | headers: {'Content-Type': 'application/json'}, 217 | body: JSON.stringify({ before: before_id, card: card.id}) 218 | }).then(function () { 219 | window.app.refresh_cards(); 220 | }); 221 | } 222 | if (card.column !== new_col) { 223 | card.column = new_col; 224 | window.app.update_card(card.id); 225 | } 226 | } 227 | 228 | document.addEventListener("DOMContentLoaded", function () { 229 | window.app.init(); 230 | }); 231 | -------------------------------------------------------------------------------- /static/plus_icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/vue.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Vue.js v2.7.16 3 | * (c) 2014-2023 Evan You 4 | * Released under the MIT License. 5 | */ 6 | /*! 7 | * Vue.js v2.7.16 8 | * (c) 2014-2023 Evan You 9 | * Released under the MIT License. 10 | */ 11 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Vue=e()}(this,(function(){"use strict";var t=Object.freeze({}),e=Array.isArray;function n(t){return null==t}function r(t){return null!=t}function o(t){return!0===t}function i(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function a(t){return"function"==typeof t}function s(t){return null!==t&&"object"==typeof t}var c=Object.prototype.toString;function u(t){return"[object Object]"===c.call(t)}function l(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return r(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function d(t){return null==t?"":Array.isArray(t)||u(t)&&t.toString===c?JSON.stringify(t,p,2):String(t)}function p(t,e){return e&&e.__v_isRef?e.value:e}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function h(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(r,1)}}var _=Object.prototype.hasOwnProperty;function b(t,e){return _.call(t,e)}function $(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var w=/-(\w)/g,x=$((function(t){return t.replace(w,(function(t,e){return e?e.toUpperCase():""}))})),C=$((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),k=/\B([A-Z])/g,S=$((function(t){return t.replace(k,"-$1").toLowerCase()}));var O=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function T(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function A(t,e){for(var n in e)t[n]=e[n];return t}function j(t){for(var e={},n=0;n0,X=W&&W.indexOf("edge/")>0;W&&W.indexOf("android");var Y=W&&/iphone|ipad|ipod|ios/.test(W);W&&/chrome\/\d+/.test(W),W&&/phantomjs/.test(W);var Q,tt=W&&W.match(/firefox\/(\d+)/),et={}.watch,nt=!1;if(q)try{var rt={};Object.defineProperty(rt,"passive",{get:function(){nt=!0}}),window.addEventListener("test-passive",null,rt)}catch(t){}var ot=function(){return void 0===Q&&(Q=!q&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),Q},it=q&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function at(t){return"function"==typeof t&&/native code/.test(t.toString())}var st,ct="undefined"!=typeof Symbol&&at(Symbol)&&"undefined"!=typeof Reflect&&at(Reflect.ownKeys);st="undefined"!=typeof Set&&at(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ut=null;function lt(t){void 0===t&&(t=null),t||ut&&ut._scope.off(),ut=t,t&&t._scope.on()}var ft=function(){function t(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),dt=function(t){void 0===t&&(t="");var e=new ft;return e.text=t,e.isComment=!0,e};function pt(t){return new ft(void 0,void 0,void 0,String(t))}function vt(t){var e=new ft(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}"function"==typeof SuppressedError&&SuppressedError;var ht=0,mt=[],gt=function(){for(var t=0;t0&&(ne((c=re(c,"".concat(a||"","_").concat(s)))[0])&&ne(l)&&(f[u]=pt(l.text+c[0].text),c.shift()),f.push.apply(f,c)):i(c)?ne(l)?f[u]=pt(l.text+c):""!==c&&f.push(pt(c)):ne(c)&&ne(l)?f[u]=pt(l.text+c.text):(o(t._isVList)&&r(c.tag)&&n(c.key)&&r(a)&&(c.key="__vlist".concat(a,"_").concat(s,"__")),f.push(c)));return f}var oe=1,ie=2;function ae(t,n,c,u,l,f){return(e(c)||i(c))&&(l=u,u=c,c=void 0),o(f)&&(l=ie),function(t,n,o,i,c){if(r(o)&&r(o.__ob__))return dt();r(o)&&r(o.is)&&(n=o.is);if(!n)return dt();e(i)&&a(i[0])&&((o=o||{}).scopedSlots={default:i[0]},i.length=0);c===ie?i=ee(i):c===oe&&(i=function(t){for(var n=0;n0,s=n?!!n.$stable:!a,c=n&&n.$key;if(n){if(n._normalized)return n._normalized;if(s&&o&&o!==t&&c===o.$key&&!a&&!o.$hasNormal)return o;for(var u in i={},n)n[u]&&"$"!==u[0]&&(i[u]=Oe(e,r,u,n[u]))}else i={};for(var l in r)l in i||(i[l]=Te(r,l));return n&&Object.isExtensible(n)&&(n._normalized=i),V(i,"$stable",s),V(i,"$key",c),V(i,"$hasNormal",a),i}function Oe(t,n,r,o){var i=function(){var n=ut;lt(t);var r=arguments.length?o.apply(null,arguments):o({}),i=(r=r&&"object"==typeof r&&!e(r)?[r]:ee(r))&&r[0];return lt(n),r&&(!i||1===r.length&&i.isComment&&!ke(i))?void 0:r};return o.proxy&&Object.defineProperty(n,r,{get:i,enumerable:!0,configurable:!0}),i}function Te(t,e){return function(){return t[e]}}function Ae(e){return{get attrs(){if(!e._attrsProxy){var n=e._attrsProxy={};V(n,"_v_attr_proxy",!0),je(n,e.$attrs,t,e,"$attrs")}return e._attrsProxy},get listeners(){e._listenersProxy||je(e._listenersProxy={},e.$listeners,t,e,"$listeners");return e._listenersProxy},get slots(){return function(t){t._slotsProxy||Ne(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(e)},emit:O(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(n){return zt(e,t,n)}))}}}function je(t,e,n,r,o){var i=!1;for(var a in e)a in t?e[a]!==n[a]&&(i=!0):(i=!0,Ee(t,a,r,o));for(var a in t)a in e||(i=!0,delete t[a]);return i}function Ee(t,e,n,r){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n[r][e]}})}function Ne(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}function Pe(){var t=ut;return t._setupContext||(t._setupContext=Ae(t))}var De,Me,Ie=null;function Le(t,e){return(t.__esModule||ct&&"Module"===t[Symbol.toStringTag])&&(t=t.default),s(t)?e.extend(t):t}function Re(t){if(e(t))for(var n=0;ndocument.createEvent("Event").timeStamp&&(on=function(){return an.now()})}var sn=function(t,e){if(t.post){if(!e.post)return 1}else if(e.post)return-1;return t.id-e.id};function cn(){var t,e;for(rn=on(),en=!0,Xe.sort(sn),nn=0;nnnn&&Xe[n].id>t.id;)n--;Xe.splice(n+1,0,t)}else Xe.push(t);tn||(tn=!0,En(cn))}}var ln="watcher",fn="".concat(ln," callback"),dn="".concat(ln," getter"),pn="".concat(ln," cleanup");function vn(t,e){return mn(t,null,{flush:"post"})}var hn={};function mn(n,r,o){var i=void 0===o?t:o,s=i.immediate,c=i.deep,u=i.flush,l=void 0===u?"pre":u;i.onTrack,i.onTrigger;var f,d,p=ut,v=function(t,e,n){void 0===n&&(n=null);var r=_n(t,null,n,p,e);return c&&r&&r.__ob__&&r.__ob__.dep.depend(),r},h=!1,m=!1;if(Bt(n)?(f=function(){return n.value},h=Rt(n)):Lt(n)?(f=function(){return n.__ob__.dep.depend(),n},c=!0):e(n)?(m=!0,h=n.some((function(t){return Lt(t)||Rt(t)})),f=function(){return n.map((function(t){return Bt(t)?t.value:Lt(t)?(t.__ob__.dep.depend(),Wn(t)):a(t)?v(t,dn):void 0}))}):f=a(n)?r?function(){return v(n,dn)}:function(){if(!p||!p._isDestroyed)return d&&d(),v(n,ln,[y])}:E,r&&c){var g=f;f=function(){return Wn(g())}}var y=function(t){d=_.onStop=function(){v(t,pn)}};if(ot())return y=E,r?s&&v(r,fn,[f(),m?[]:void 0,y]):f(),E;var _=new Xn(ut,f,E,{lazy:!0});_.noRecurse=!r;var b=m?[]:hn;return _.run=function(){if(_.active)if(r){var t=_.get();(c||h||(m?t.some((function(t,e){return L(t,b[e])})):L(t,b)))&&(d&&d(),v(r,fn,[t,b===hn?void 0:b,y]),b=t)}else _.get()},"sync"===l?_.update=_.run:"post"===l?(_.post=!0,_.update=function(){return un(_)}):_.update=function(){if(p&&p===ut&&!p._isMounted){var t=p._preWatchers||(p._preWatchers=[]);t.indexOf(_)<0&&t.push(_)}else un(_)},r?s?_.run():b=_.get():"post"===l&&p?p.$once("hook:mounted",(function(){return _.get()})):_.get(),function(){_.teardown()}}function gn(t){var e=t._provided,n=t.$parent&&t.$parent._provided;return n===e?t._provided=Object.create(n):e}function yn(t,e,n){bt();try{if(e)for(var r=e;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i1)return n&&a(e)?e.call(r):e}},h:function(t,e,n){return ae(ut,t,e,n,2,!0)},getCurrentInstance:function(){return ut&&{proxy:ut}},useSlots:function(){return Pe().slots},useAttrs:function(){return Pe().attrs},useListeners:function(){return Pe().listeners},mergeDefaults:function(t,n){var r=e(t)?t.reduce((function(t,e){return t[e]={},t}),{}):t;for(var o in n){var i=r[o];i?e(i)||a(i)?r[o]={type:i,default:n[o]}:i.default=n[o]:null===i&&(r[o]={default:n[o]})}return r},nextTick:En,set:Nt,del:Pt,useCssModule:function(e){return t},useCssVars:function(t){if(q){var e=ut;e&&vn((function(){var n=e.$el,r=t(e,e._setupProxy);if(n&&1===n.nodeType){var o=n.style;for(var i in r)o.setProperty("--".concat(i),r[i])}}))}},defineAsyncComponent:function(t){a(t)&&(t={loader:t});var e=t.loader,n=t.loadingComponent,r=t.errorComponent,o=t.delay,i=void 0===o?200:o,s=t.timeout;t.suspensible;var c=t.onError,u=null,l=0,f=function(){var t;return u||(t=u=e().catch((function(t){if(t=t instanceof Error?t:new Error(String(t)),c)return new Promise((function(e,n){c(t,(function(){return e((l++,u=null,f()))}),(function(){return n(t)}),l+1)}));throw t})).then((function(e){return t!==u&&u?u:(e&&(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),e)})))};return function(){return{component:f(),delay:i,timeout:s,error:r,loading:n}}},onBeforeMount:Pn,onMounted:Dn,onBeforeUpdate:Mn,onUpdated:In,onBeforeUnmount:Ln,onUnmounted:Rn,onActivated:Fn,onDeactivated:Hn,onServerPrefetch:Bn,onRenderTracked:Un,onRenderTriggered:zn,onErrorCaptured:function(t,e){void 0===e&&(e=ut),Vn(t,e)}}),qn=new st;function Wn(t){return Zn(t,qn),qn.clear(),t}function Zn(t,n){var r,o,i=e(t);if(!(!i&&!s(t)||t.__v_skip||Object.isFrozen(t)||t instanceof ft)){if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(i)for(r=t.length;r--;)Zn(t[r],n);else if(Bt(t))Zn(t.value,n);else for(r=(o=Object.keys(t)).length;r--;)Zn(t[o[r]],n)}}var Gn=0,Xn=function(){function t(t,e,n,r,o){!function(t,e){void 0===e&&(e=Me),e&&e.active&&e.effects.push(t)}(this,Me&&!Me._vm?Me:t?t._scope:void 0),(this.vm=t)&&o&&(t._watcher=this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Gn,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new st,this.newDepIds=new st,this.expression="",a(e)?this.getter=e:(this.getter=function(t){if(!K.test(t)){var e=t.split(".");return function(t){for(var n=0;n-1)if(i&&!b(o,"default"))s=!1;else if(""===s||s===S(t)){var u=jr(String,o.type);(u<0||c-1:"string"==typeof t?t.split(",").indexOf(n)>-1:(r=t,"[object RegExp]"===c.call(r)&&t.test(n));var r}function Mr(t,e){var n=t.cache,r=t.keys,o=t._vnode,i=t.$vnode;for(var a in n){var s=n[a];if(s){var c=s.name;c&&!e(c)&&Ir(n,a,r,o)}}i.componentOptions.children=void 0}function Ir(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,y(n,e)}!function(e){e.prototype._init=function(e){var n=this;n._uid=sr++,n._isVue=!0,n.__v_skip=!0,n._scope=new ze(!0),n._scope.parent=void 0,n._scope._vm=!0,e&&e._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=Cr(cr(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Ue(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;var n=e.$options,r=e.$vnode=n._parentVnode,o=r&&r.context;e.$slots=xe(n._renderChildren,o),e.$scopedSlots=r?Se(e.$parent,r.data.scopedSlots,e.$slots):t,e._c=function(t,n,r,o){return ae(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return ae(e,t,n,r,o,!0)};var i=r&&r.data;Et(e,"$attrs",i&&i.attrs||t,null,!0),Et(e,"$listeners",n._parentListeners||t,null,!0)}(n),Ge(n,"beforeCreate",void 0,!1),function(t){var e=ar(t.$options.inject,t);e&&(Ot(!1),Object.keys(e).forEach((function(n){Et(t,n,e[n])})),Ot(!0))}(n),tr(n),function(t){var e=t.$options.provide;if(e){var n=a(e)?e.call(t):e;if(!s(n))return;for(var r=gn(t),o=ct?Reflect.ownKeys(n):Object.keys(n),i=0;i1?T(n):n;for(var r=T(arguments,1),o='event handler for "'.concat(t,'"'),i=0,a=n.length;iparseInt(this.max)&&Ir(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Ir(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Mr(t,(function(t){return Dr(e,t)}))})),this.$watch("exclude",(function(e){Mr(t,(function(t){return!Dr(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Re(t),n=e&&e.componentOptions;if(n){var r=Pr(n),o=this.include,i=this.exclude;if(o&&(!r||!Dr(o,r))||i&&r&&Dr(i,r))return e;var a=this.cache,s=this.keys,c=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;a[c]?(e.componentInstance=a[c].componentInstance,y(s,c),s.push(c)):(this.vnodeToCache=e,this.keyToCache=c),e.data.keepAlive=!0}return e||t&&t[0]}},Fr={KeepAlive:Rr};!function(t){var e={get:function(){return B}};Object.defineProperty(t,"config",e),t.util={warn:gr,extend:A,mergeOptions:Cr,defineReactive:Et},t.set=Nt,t.delete=Pt,t.nextTick=En,t.observable=function(t){return jt(t),t},t.options=Object.create(null),F.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,A(t.options.components,Fr),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=T(arguments,1);return n.unshift(this),a(t.install)?t.install.apply(t,n):a(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Cr(this.options,t),this}}(t),Nr(t),function(t){F.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&a(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Er),Object.defineProperty(Er.prototype,"$isServer",{get:ot}),Object.defineProperty(Er.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Er,"FunctionalRenderContext",{value:ur}),Er.version=Kn;var Hr=h("style,class"),Br=h("input,textarea,option,select,progress"),Ur=function(t,e,n){return"value"===n&&Br(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},zr=h("contenteditable,draggable,spellcheck"),Vr=h("events,caret,typing,plaintext-only"),Kr=function(t,e){return Gr(e)||"false"===e?"false":"contenteditable"===t&&Vr(e)?e:"true"},Jr=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),qr="http://www.w3.org/1999/xlink",Wr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Zr=function(t){return Wr(t)?t.slice(6,t.length):""},Gr=function(t){return null==t||!1===t};function Xr(t){for(var e=t.data,n=t,o=t;r(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(e=Yr(o.data,e));for(;r(n=n.parent);)n&&n.data&&(e=Yr(e,n.data));return function(t,e){if(r(t)||r(e))return Qr(t,to(e));return""}(e.staticClass,e.class)}function Yr(t,e){return{staticClass:Qr(t.staticClass,e.staticClass),class:r(t.class)?[t.class,e.class]:e.class}}function Qr(t,e){return t?e?t+" "+e:t:e||""}function to(t){return Array.isArray(t)?function(t){for(var e,n="",o=0,i=t.length;o-1?Oo(t,e,n):Jr(e)?Gr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):zr(e)?t.setAttribute(e,Kr(e,n)):Wr(e)?Gr(n)?t.removeAttributeNS(qr,Zr(e)):t.setAttributeNS(qr,e,n):Oo(t,e,n)}function Oo(t,e,n){if(Gr(n))t.removeAttribute(e);else{if(Z&&!G&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var To={create:ko,update:ko};function Ao(t,e){var o=e.elm,i=e.data,a=t.data;if(!(n(i.staticClass)&&n(i.class)&&(n(a)||n(a.staticClass)&&n(a.class)))){var s=Xr(e),c=o._transitionClasses;r(c)&&(s=Qr(s,to(c))),s!==o._prevClass&&(o.setAttribute("class",s),o._prevClass=s)}}var jo,Eo,No,Po,Do,Mo,Io={create:Ao,update:Ao},Lo=/[\w).+\-_$\]]/;function Ro(t){var e,n,r,o,i,a=!1,s=!1,c=!1,u=!1,l=0,f=0,d=0,p=0;for(r=0;r=0&&" "===(h=t.charAt(v));v--);h&&Lo.test(h)||(u=!0)}}else void 0===o?(p=r+1,o=t.slice(0,r).trim()):m();function m(){(i||(i=[])).push(t.slice(p,r).trim()),p=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==p&&m(),i)for(r=0;r-1?{exp:t.slice(0,Po),key:'"'+t.slice(Po+1)+'"'}:{exp:t,key:null};Eo=t,Po=Do=Mo=0;for(;!ei();)ni(No=ti())?oi(No):91===No&&ri(No);return{exp:t.slice(0,Do),key:t.slice(Do+1,Mo)}}(t);return null===n.key?"".concat(t,"=").concat(e):"$set(".concat(n.exp,", ").concat(n.key,", ").concat(e,")")}function ti(){return Eo.charCodeAt(++Po)}function ei(){return Po>=jo}function ni(t){return 34===t||39===t}function ri(t){var e=1;for(Do=Po;!ei();)if(ni(t=ti()))oi(t);else if(91===t&&e++,93===t&&e--,0===e){Mo=Po;break}}function oi(t){for(var e=t;!ei()&&(t=ti())!==e;);}var ii,ai="__r",si="__c";function ci(t,e,n){var r=ii;return function o(){null!==e.apply(null,arguments)&&fi(t,o,n,r)}}var ui=xn&&!(tt&&Number(tt[1])<=53);function li(t,e,n,r){if(ui){var o=rn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}ii.addEventListener(t,e,nt?{capture:n,passive:r}:n)}function fi(t,e,n,r){(r||ii).removeEventListener(t,e._wrapper||e,n)}function di(t,e){if(!n(t.data.on)||!n(e.data.on)){var o=e.data.on||{},i=t.data.on||{};ii=e.elm||t.elm,function(t){if(r(t[ai])){var e=Z?"change":"input";t[e]=[].concat(t[ai],t[e]||[]),delete t[ai]}r(t[si])&&(t.change=[].concat(t[si],t.change||[]),delete t[si])}(o),Yt(o,i,li,fi,ci,e.context),ii=void 0}}var pi,vi={create:di,update:di,destroy:function(t){return di(t,vo)}};function hi(t,e){if(!n(t.data.domProps)||!n(e.data.domProps)){var i,a,s=e.elm,c=t.data.domProps||{},u=e.data.domProps||{};for(i in(r(u.__ob__)||o(u._v_attr_proxy))&&(u=e.data.domProps=A({},u)),c)i in u||(s[i]="");for(i in u){if(a=u[i],"textContent"===i||"innerHTML"===i){if(e.children&&(e.children.length=0),a===c[i])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===i&&"PROGRESS"!==s.tagName){s._value=a;var l=n(a)?"":String(a);mi(s,l)&&(s.value=l)}else if("innerHTML"===i&&ro(s.tagName)&&n(s.innerHTML)){(pi=pi||document.createElement("div")).innerHTML="".concat(a,"");for(var f=pi.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;f.firstChild;)s.appendChild(f.firstChild)}else if(a!==c[i])try{s[i]=a}catch(t){}}}}function mi(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,o=t._vModifiers;if(r(o)){if(o.number)return v(n)!==v(e);if(o.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var gi={create:hi,update:hi},yi=$((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function _i(t){var e=bi(t.style);return t.staticStyle?A(t.staticStyle,e):e}function bi(t){return Array.isArray(t)?j(t):"string"==typeof t?yi(t):t}var $i,wi=/^--/,xi=/\s*!important$/,Ci=function(t,e,n){if(wi.test(e))t.style.setProperty(e,n);else if(xi.test(n))t.style.setProperty(S(e),n.replace(xi,""),"important");else{var r=Si(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(Ai).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Ei(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Ai).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function Ni(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&A(e,Pi(t.name||"v")),A(e,t),e}return"string"==typeof t?Pi(t):void 0}}var Pi=$((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),Di=q&&!G,Mi="transition",Ii="animation",Li="transition",Ri="transitionend",Fi="animation",Hi="animationend";Di&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Li="WebkitTransition",Ri="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Fi="WebkitAnimation",Hi="webkitAnimationEnd"));var Bi=q?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Ui(t){Bi((function(){Bi(t)}))}function zi(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),ji(t,e))}function Vi(t,e){t._transitionClasses&&y(t._transitionClasses,e),Ei(t,e)}function Ki(t,e,n){var r=qi(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Mi?Ri:Hi,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n=Mi,l=a,f=i.length):e===Ii?u>0&&(n=Ii,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Mi:Ii:null)?n===Mi?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Mi&&Ji.test(r[Li+"Property"])}}function Wi(t,e){for(;t.length1}function ta(t,e){!0!==e.data.show&&Gi(e)}var ea=function(t){var a,s,c={},u=t.modules,l=t.nodeOps;for(a=0;av?b(t,n(o[g+1])?null:o[g+1].elm,o,p,g,i):p>g&&w(e,f,v)}(f,h,m,i,u):r(m)?(r(t.text)&&l.setTextContent(f,""),b(f,null,m,0,m.length-1,i)):r(h)?w(h,0,h.length-1):r(t.text)&&l.setTextContent(f,""):t.text!==e.text&&l.setTextContent(f,e.text),r(v)&&r(p=v.hook)&&r(p=p.postpatch)&&p(t,e)}}}function S(t,e,n){if(o(n)&&r(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i-1,a.selected!==i&&(a.selected=i);else if(D(aa(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function ia(t,e){return e.every((function(e){return!D(e,t)}))}function aa(t){return"_value"in t?t._value:t.value}function sa(t){t.target.composing=!0}function ca(t){t.target.composing&&(t.target.composing=!1,ua(t.target,"input"))}function ua(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function la(t){return!t.componentInstance||t.data&&t.data.transition?t:la(t.componentInstance._vnode)}var fa={bind:function(t,e,n){var r=e.value,o=(n=la(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Gi(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=la(n)).data&&n.data.transition?(n.data.show=!0,r?Gi(n,(function(){t.style.display=t.__vOriginalDisplay})):Xi(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},da={model:na,show:fa},pa={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function va(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?va(Re(e.children)):t}function ha(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[x(r)]=o[r];return e}function ma(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var ga=function(t){return t.tag||ke(t)},ya=function(t){return"show"===t.name},_a={name:"transition",props:pa,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ga)).length){var r=this.mode,o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var a=va(o);if(!a)return o;if(this._leaving)return ma(t,o);var s="__transition-".concat(this._uid,"-");a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=ha(this),u=this._vnode,l=va(u);if(a.data.directives&&a.data.directives.some(ya)&&(a.data.show=!0),l&&l.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(a,l)&&!ke(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=A({},c);if("out-in"===r)return this._leaving=!0,Qt(f,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),ma(t,o);if("in-out"===r){if(ke(a))return u;var d,p=function(){d()};Qt(c,"afterEnter",p),Qt(c,"enterCancelled",p),Qt(f,"delayLeave",(function(t){d=t}))}}return o}}},ba=A({tag:String,moveClass:String},pa);delete ba.mode;var $a={props:ba,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Je(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=ha(this),s=0;s-1?ao[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:ao[t]=/HTMLUnknownElement/.test(e.toString())},A(Er.options.directives,da),A(Er.options.components,ka),Er.prototype.__patch__=q?ea:E,Er.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=dt),Ge(t,"beforeMount"),r=function(){t._update(t._render(),n)},new Xn(t,r,E,{before:function(){t._isMounted&&!t._isDestroyed&&Ge(t,"beforeUpdate")}},!0),n=!1;var o=t._preWatchers;if(o)for(var i=0;i\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,La=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Ra="[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(U.source,"]*"),Fa="((?:".concat(Ra,"\\:)?").concat(Ra,")"),Ha=new RegExp("^<".concat(Fa)),Ba=/^\s*(\/?)>/,Ua=new RegExp("^<\\/".concat(Fa,"[^>]*>")),za=/^]+>/i,Va=/^",""":'"',"&":"&"," ":"\n"," ":"\t","'":"'"},Za=/&(?:lt|gt|quot|amp|#39);/g,Ga=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Xa=h("pre,textarea",!0),Ya=function(t,e){return t&&Xa(t)&&"\n"===e[0]};function Qa(t,e){var n=e?Ga:Za;return t.replace(n,(function(t){return Wa[t]}))}function ts(t,e){for(var n,r,o=[],i=e.expectHTML,a=e.isUnaryTag||N,s=e.canBeLeftOpenTag||N,c=0,u=function(){if(n=t,r&&Ja(r)){var u=0,d=r.toLowerCase(),p=qa[d]||(qa[d]=new RegExp("([\\s\\S]*?)(]*>)","i"));w=t.replace(p,(function(t,n,r){return u=r.length,Ja(d)||"noscript"===d||(n=n.replace(//g,"$1").replace(//g,"$1")),Ya(d,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));c+=t.length-w.length,t=w,f(d,c-u,c)}else{var v=t.indexOf("<");if(0===v){if(Va.test(t)){var h=t.indexOf("--\x3e");if(h>=0)return e.shouldKeepComment&&e.comment&&e.comment(t.substring(4,h),c,c+h+3),l(h+3),"continue"}if(Ka.test(t)){var m=t.indexOf("]>");if(m>=0)return l(m+2),"continue"}var g=t.match(za);if(g)return l(g[0].length),"continue";var y=t.match(Ua);if(y){var _=c;return l(y[0].length),f(y[1],_,c),"continue"}var b=function(){var e=t.match(Ha);if(e){var n={tagName:e[1],attrs:[],start:c};l(e[0].length);for(var r=void 0,o=void 0;!(r=t.match(Ba))&&(o=t.match(La)||t.match(Ia));)o.start=c,l(o[0].length),o.end=c,n.attrs.push(o);if(r)return n.unarySlash=r[1],l(r[0].length),n.end=c,n}}();if(b)return function(t){var n=t.tagName,c=t.unarySlash;i&&("p"===r&&Ma(n)&&f(r),s(n)&&r===n&&f(n));for(var u=a(n)||!!c,l=t.attrs.length,d=new Array(l),p=0;p=0){for(w=t.slice(v);!(Ua.test(w)||Ha.test(w)||Va.test(w)||Ka.test(w)||(x=w.indexOf("<",1))<0);)v+=x,w=t.slice(v);$=t.substring(0,v)}v<0&&($=t),$&&l($.length),e.chars&&$&&e.chars($,c-$.length,c)}if(t===n)return e.chars&&e.chars(t),"break"};t;){if("break"===u())break}function l(e){c+=e,t=t.substring(e)}function f(t,n,i){var a,s;if(null==n&&(n=c),null==i&&(i=c),t)for(s=t.toLowerCase(),a=o.length-1;a>=0&&o[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=o.length-1;u>=a;u--)e.end&&e.end(o[u].tag,n,i);o.length=a,r=a&&o[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,i):"p"===s&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}f()}var es,ns,rs,os,is,as,ss,cs,us=/^@|^v-on:/,ls=/^v-|^@|^:|^#/,fs=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,ds=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ps=/^\(|\)$/g,vs=/^\[.*\]$/,hs=/:(.*)$/,ms=/^:|^\.|^v-bind:/,gs=/\.[^.\]]+(?=[^\]]*$)/g,ys=/^v-slot(:|$)|^#/,_s=/[\r\n]/,bs=/[ \f\t\r\n]+/g,$s=$(Na),ws="_empty_";function xs(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:js(e),rawAttrsMap:{},parent:n,children:[]}}function Cs(t,e){es=e.warn||Ho,as=e.isPreTag||N,ss=e.mustUseProp||N,cs=e.getTagNamespace||N,e.isReservedTag,rs=Bo(e.modules,"transformNode"),os=Bo(e.modules,"preTransformNode"),is=Bo(e.modules,"postTransformNode"),ns=e.delimiters;var n,r,o=[],i=!1!==e.preserveWhitespace,a=e.whitespace,s=!1,c=!1;function u(t){if(l(t),s||t.processed||(t=ks(t,e)),o.length||t===n||n.if&&(t.elseif||t.else)&&Os(n,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)a=t,u=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children),u&&u.if&&Os(u,{exp:a.elseif,block:a});else{if(t.slotScope){var i=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[i]=t}r.children.push(t),t.parent=r}var a,u;t.children=t.children.filter((function(t){return!t.slotScope})),l(t),t.pre&&(s=!1),as(t.tag)&&(c=!1);for(var f=0;fc&&(s.push(i=t.slice(c,o)),a.push(JSON.stringify(i)));var u=Ro(r[1].trim());a.push("_s(".concat(u,")")),s.push({"@binding":u}),c=o+r[0].length}return c-1")+("true"===i?":(".concat(e,")"):":_q(".concat(e,",").concat(i,")"))),qo(t,"change","var $$a=".concat(e,",")+"$$el=$event.target,"+"$$c=$$el.checked?(".concat(i,"):(").concat(a,");")+"if(Array.isArray($$a)){"+"var $$v=".concat(r?"_n("+o+")":o,",")+"$$i=_i($$a,$$v);"+"if($$el.checked){$$i<0&&(".concat(Qo(e,"$$a.concat([$$v])"),")}")+"else{$$i>-1&&(".concat(Qo(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))"),")}")+"}else{".concat(Qo(e,"$$c"),"}"),null,!0)}(t,r,o);else if("input"===i&&"radio"===a)!function(t,e,n){var r=n&&n.number,o=Wo(t,"value")||"null";o=r?"_n(".concat(o,")"):o,Uo(t,"checked","_q(".concat(e,",").concat(o,")")),qo(t,"change",Qo(e,o),null,!0)}(t,r,o);else if("input"===i||"textarea"===i)!function(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,u=i?"change":"range"===r?ai:"input",l="$event.target.value";s&&(l="$event.target.value.trim()");a&&(l="_n(".concat(l,")"));var f=Qo(e,l);c&&(f="if($event.target.composing)return;".concat(f));Uo(t,"value","(".concat(e,")")),qo(t,u,f,null,!0),(s||a)&&qo(t,"blur","$forceUpdate()")}(t,r,o);else if(!B.isReservedTag(i))return Yo(t,r,o),!1;return!0},text:function(t,e){e.value&&Uo(t,"textContent","_s(".concat(e.value,")"),e)},html:function(t,e){e.value&&Uo(t,"innerHTML","_s(".concat(e.value,")"),e)}},Rs={expectHTML:!0,modules:Ds,directives:Ls,isPreTag:function(t){return"pre"===t},isUnaryTag:Pa,mustUseProp:Ur,canBeLeftOpenTag:Da,isReservedTag:oo,getTagNamespace:io,staticKeys:function(t){return t.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(",")}(Ds)},Fs=$((function(t){return h("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function Hs(t,e){t&&(Ms=Fs(e.staticKeys||""),Is=e.isReservedTag||N,Bs(t),Us(t,!1))}function Bs(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||m(t.tag)||!Is(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Ms)))}(t),1===t.type){if(!Is(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e|^function(?:\s+[\w$]+)?\s*\(/,Vs=/\([^)]*?\);*$/,Ks=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Js={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},qs={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Ws=function(t){return"if(".concat(t,")return null;")},Zs={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Ws("$event.target !== $event.currentTarget"),ctrl:Ws("!$event.ctrlKey"),shift:Ws("!$event.shiftKey"),alt:Ws("!$event.altKey"),meta:Ws("!$event.metaKey"),left:Ws("'button' in $event && $event.button !== 0"),middle:Ws("'button' in $event && $event.button !== 1"),right:Ws("'button' in $event && $event.button !== 2")};function Gs(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var a=Xs(t[i]);t[i]&&t[i].dynamic?o+="".concat(i,",").concat(a,","):r+='"'.concat(i,'":').concat(a,",")}return r="{".concat(r.slice(0,-1),"}"),o?n+"_d(".concat(r,",[").concat(o.slice(0,-1),"])"):n+r}function Xs(t){if(!t)return"function(){}";if(Array.isArray(t))return"[".concat(t.map((function(t){return Xs(t)})).join(","),"]");var e=Ks.test(t.value),n=zs.test(t.value),r=Ks.test(t.value.replace(Vs,""));if(t.modifiers){var o="",i="",a=[],s=function(e){if(Zs[e])i+=Zs[e],Js[e]&&a.push(e);else if("exact"===e){var n=t.modifiers;i+=Ws(["ctrl","shift","alt","meta"].filter((function(t){return!n[t]})).map((function(t){return"$event.".concat(t,"Key")})).join("||"))}else a.push(e)};for(var c in t.modifiers)s(c);a.length&&(o+=function(t){return"if(!$event.type.indexOf('key')&&"+"".concat(t.map(Ys).join("&&"),")return null;")}(a)),i&&(o+=i);var u=e?"return ".concat(t.value,".apply(null, arguments)"):n?"return (".concat(t.value,").apply(null, arguments)"):r?"return ".concat(t.value):t.value;return"function($event){".concat(o).concat(u,"}")}return e||n?t.value:"function($event){".concat(r?"return ".concat(t.value):t.value,"}")}function Ys(t){var e=parseInt(t,10);if(e)return"$event.keyCode!==".concat(e);var n=Js[t],r=qs[t];return"_k($event.keyCode,"+"".concat(JSON.stringify(t),",")+"".concat(JSON.stringify(n),",")+"$event.key,"+"".concat(JSON.stringify(r))+")"}var Qs={on:function(t,e){t.wrapListeners=function(t){return"_g(".concat(t,",").concat(e.value,")")}},bind:function(t,e){t.wrapData=function(n){return"_b(".concat(n,",'").concat(t.tag,"',").concat(e.value,",").concat(e.modifiers&&e.modifiers.prop?"true":"false").concat(e.modifiers&&e.modifiers.sync?",true":"",")")}},cloak:E},tc=function(t){this.options=t,this.warn=t.warn||Ho,this.transforms=Bo(t.modules,"transformCode"),this.dataGenFns=Bo(t.modules,"genData"),this.directives=A(A({},Qs),t.directives);var e=t.isReservedTag||N;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function ec(t,e){var n=new tc(e),r=t?"script"===t.tag?"null":nc(t,n):'_c("div")';return{render:"with(this){return ".concat(r,"}"),staticRenderFns:n.staticRenderFns}}function nc(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return rc(t,e);if(t.once&&!t.onceProcessed)return oc(t,e);if(t.for&&!t.forProcessed)return sc(t,e);if(t.if&&!t.ifProcessed)return ic(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=fc(t,e),o="_t(".concat(n).concat(r?",function(){return ".concat(r,"}"):""),i=t.attrs||t.dynamicAttrs?vc((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:x(t.name),value:t.value,dynamic:t.dynamic}}))):null,a=t.attrsMap["v-bind"];!i&&!a||r||(o+=",null");i&&(o+=",".concat(i));a&&(o+="".concat(i?"":",null",",").concat(a));return o+")"}(t,e);var n=void 0;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:fc(e,n,!0);return"_c(".concat(t,",").concat(cc(e,n)).concat(r?",".concat(r):"",")")}(t.component,t,e);else{var r=void 0,o=e.maybeComponent(t);(!t.plain||t.pre&&o)&&(r=cc(t,e));var i=void 0,a=e.options.bindings;o&&a&&!1!==a.__isScriptSetup&&(i=function(t,e){var n=x(e),r=C(n),o=function(o){return t[e]===o?e:t[n]===o?n:t[r]===o?r:void 0},i=o("setup-const")||o("setup-reactive-const");if(i)return i;var a=o("setup-let")||o("setup-ref")||o("setup-maybe-ref");if(a)return a}(a,t.tag)),i||(i="'".concat(t.tag,"'"));var s=t.inlineTemplate?null:fc(t,e,!0);n="_c(".concat(i).concat(r?",".concat(r):"").concat(s?",".concat(s):"",")")}for(var c=0;c>>0}(a)):"",")")}(t,t.scopedSlots,e),",")),t.model&&(n+="model:{value:".concat(t.model.value,",callback:").concat(t.model.callback,",expression:").concat(t.model.expression,"},")),t.inlineTemplate){var i=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=ec(n,e.options);return"inlineTemplate:{render:function(){".concat(r.render,"},staticRenderFns:[").concat(r.staticRenderFns.map((function(t){return"function(){".concat(t,"}")})).join(","),"]}")}}(t,e);i&&(n+="".concat(i,","))}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b(".concat(n,',"').concat(t.tag,'",').concat(vc(t.dynamicAttrs),")")),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function uc(t){return 1===t.type&&("slot"===t.tag||t.children.some(uc))}function lc(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return ic(t,e,lc,"null");if(t.for&&!t.forProcessed)return sc(t,e,lc);var r=t.slotScope===ws?"":String(t.slotScope),o="function(".concat(r,"){")+"return ".concat("template"===t.tag?t.if&&n?"(".concat(t.if,")?").concat(fc(t,e)||"undefined",":undefined"):fc(t,e)||"undefined":nc(t,e),"}"),i=r?"":",proxy:true";return"{key:".concat(t.slotTarget||'"default"',",fn:").concat(o).concat(i,"}")}function fc(t,e,n,r,o){var i=t.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return"".concat((r||nc)(a,e)).concat(s)}var c=n?function(t,e){for(var n=0,r=0;r':'
    ',_c.innerHTML.indexOf(" ")>0}var xc=!!q&&wc(!1),Cc=!!q&&wc(!0),kc=$((function(t){var e=co(t);return e&&e.innerHTML})),Sc=Er.prototype.$mount;return Er.prototype.$mount=function(t,e){if((t=t&&co(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=kc(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var o=$c(r,{outputSourceRange:!1,shouldDecodeNewlines:xc,shouldDecodeNewlinesForHref:Cc,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return Sc.call(this,t,e)},Er.compile=$c,A(Er,Jn),Er.effect=function(t,e){var n=new Xn(ut,t,E,{sync:!0});e&&(n.update=function(){e((function(){return n.run()}))})},Er})); --------------------------------------------------------------------------------