wagtail 7.1.1__py3-none-any.whl → 7.2rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wagtail/__init__.py +1 -1
- wagtail/actions/copy_page.py +1 -1
- wagtail/actions/create_alias.py +1 -1
- wagtail/actions/delete_page.py +1 -1
- wagtail/actions/publish_page_revision.py +1 -1
- wagtail/actions/publish_revision.py +1 -1
- wagtail/actions/revert_to_page_revision.py +1 -1
- wagtail/actions/unpublish.py +1 -1
- wagtail/actions/unpublish_page.py +1 -1
- wagtail/admin/auth.py +3 -1
- wagtail/admin/checks.py +2 -2
- wagtail/admin/filters.py +28 -1
- wagtail/admin/forms/collections.py +1 -1
- wagtail/admin/forms/comments.py +1 -1
- wagtail/admin/forms/models.py +1 -1
- wagtail/admin/forms/pages.py +1 -1
- wagtail/admin/forms/tags.py +1 -1
- wagtail/admin/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/cs/LC_MESSAGES/django.po +25 -1
- wagtail/admin/locale/en/LC_MESSAGES/django.po +278 -192
- wagtail/admin/locale/en/LC_MESSAGES/djangojs.po +29 -15
- wagtail/admin/locale/it/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/it/LC_MESSAGES/django.po +3 -2
- wagtail/admin/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/nl/LC_MESSAGES/django.po +57 -3
- wagtail/admin/locale/nl/LC_MESSAGES/djangojs.mo +0 -0
- wagtail/admin/locale/nl/LC_MESSAGES/djangojs.po +8 -2
- wagtail/admin/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/ru/LC_MESSAGES/django.po +58 -1
- wagtail/admin/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/admin/locale/tr/LC_MESSAGES/django.po +3 -2
- wagtail/admin/static/wagtailadmin/css/core.css +1 -1
- wagtail/admin/static/wagtailadmin/js/bulk-actions.js +1 -1
- wagtail/admin/static/wagtailadmin/js/chooser-modal.js +1 -1
- wagtail/admin/static/wagtailadmin/js/chooser-widget-telepath.js +1 -1
- wagtail/admin/static/wagtailadmin/js/chooser-widget.js +1 -1
- wagtail/admin/static/wagtailadmin/js/comments.js +1 -1
- wagtail/admin/static/wagtailadmin/js/core.js +1 -1
- wagtail/admin/static/wagtailadmin/js/core.js.LICENSE.txt +2 -2
- wagtail/admin/static/wagtailadmin/js/date-time-chooser.js +1 -1
- wagtail/admin/static/wagtailadmin/js/draftail.js +1 -1
- wagtail/admin/static/wagtailadmin/js/filtered-select.js +1 -1
- wagtail/admin/static/wagtailadmin/js/icons.js +1 -1
- wagtail/admin/static/wagtailadmin/js/modal-workflow.js +1 -1
- wagtail/admin/static/wagtailadmin/js/page-chooser-modal.js +1 -1
- wagtail/admin/static/wagtailadmin/js/page-chooser-telepath.js +1 -1
- wagtail/admin/static/wagtailadmin/js/page-chooser.js +1 -1
- wagtail/admin/static/wagtailadmin/js/privacy-switch.js +1 -1
- wagtail/admin/static/wagtailadmin/js/sidebar.js +1 -1
- wagtail/admin/static/wagtailadmin/js/task-chooser-modal.js +1 -1
- wagtail/admin/static/wagtailadmin/js/task-chooser.js +1 -1
- wagtail/admin/static/wagtailadmin/js/telepath/blocks.js +1 -1
- wagtail/admin/static/wagtailadmin/js/telepath/telepath.js +1 -1
- wagtail/admin/static/wagtailadmin/js/telepath/widgets.js +1 -1
- wagtail/admin/static/wagtailadmin/js/userbar.js +1 -1
- wagtail/admin/static/wagtailadmin/js/userbar.js.LICENSE.txt +2 -2
- wagtail/admin/static/wagtailadmin/js/vendor/bootstrap-modal.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/bootstrap-transition.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/jquery-3.6.0.min.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/jquery-ui-1.13.2.min.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/jquery.datetimepicker.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/jquery.fileupload-process.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/jquery.fileupload.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/jquery.iframe-transport.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor/tag-it.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor.js +1 -1
- wagtail/admin/static/wagtailadmin/js/vendor.js.LICENSE.txt +1 -1
- wagtail/admin/static/wagtailadmin/js/wagtailadmin.js +1 -1
- wagtail/admin/static/wagtailadmin/js/workflow-action.js +1 -1
- wagtail/admin/templates/wagtailadmin/account/account.html +2 -0
- wagtail/admin/templates/wagtailadmin/base.html +14 -0
- wagtail/admin/templates/wagtailadmin/generic/chooser/chooser.html +2 -1
- wagtail/admin/templates/wagtailadmin/generic/chooser/creation_form.html +2 -1
- wagtail/admin/templates/wagtailadmin/generic/form.html +3 -1
- wagtail/admin/templates/wagtailadmin/panels/multi_field_panel_child.html +1 -1
- wagtail/admin/templates/wagtailadmin/panels/object_list.html +1 -1
- wagtail/admin/templates/wagtailadmin/panels/tabbed_interface.html +3 -2
- wagtail/admin/templates/wagtailadmin/shared/formatted_field.html +1 -1
- wagtail/admin/templates/wagtailadmin/shared/forms/single_checkbox.html +1 -1
- wagtail/admin/templates/wagtailadmin/shared/keyboard_shortcuts_dialog.html +19 -0
- wagtail/admin/templates/wagtailadmin/shared/panel.html +1 -1
- wagtail/admin/templates/wagtailadmin/shared/set_privacy.html +15 -0
- wagtail/admin/templates/wagtailadmin/shared/side_panels/checks.html +28 -1
- wagtail/admin/templates/wagtailadmin/shared/workflow_history/detail.html +2 -2
- wagtail/admin/templates/wagtailadmin/{pages/listing/_ordering_header.html → tables/ordering_header.html} +2 -2
- wagtail/admin/templates/wagtailadmin/tables/title_cell.html +1 -1
- wagtail/admin/templates/wagtailadmin/userbar/base.html +6 -3
- wagtail/admin/templates/wagtailadmin/userbar/item_admin.html +2 -2
- wagtail/admin/templates/wagtailadmin/userbar/item_page_add.html +2 -2
- wagtail/admin/templates/wagtailadmin/userbar/item_page_edit.html +2 -2
- wagtail/admin/templates/wagtailadmin/userbar/item_page_explore.html +2 -2
- wagtail/admin/templates/wagtailadmin/widgets/{daterange_input.html → range_input.html} +1 -1
- wagtail/admin/templates/wagtailadmin/workflows/task_chooser/chooser.html +4 -2
- wagtail/admin/templatetags/wagtailadmin_tags.py +56 -22
- wagtail/admin/tests/api/test_pages.py +7 -7
- wagtail/admin/tests/api/test_renderer_classes.py +16 -0
- wagtail/admin/tests/pages/test_create_page.py +34 -2
- wagtail/admin/tests/pages/test_edit_page.py +128 -14
- wagtail/admin/tests/pages/test_explorer_view.py +34 -7
- wagtail/admin/tests/pages/test_reorder_page.py +11 -0
- wagtail/admin/tests/test_collections_views.py +12 -0
- wagtail/admin/tests/test_edit_handlers.py +3 -3
- wagtail/admin/tests/test_filters.py +2 -2
- wagtail/admin/tests/test_keyboard_shortcuts.py +52 -2
- wagtail/admin/tests/test_menu.py +0 -2
- wagtail/admin/tests/test_privacy.py +16 -16
- wagtail/admin/tests/test_templatetags.py +137 -0
- wagtail/admin/tests/test_userbar.py +75 -35
- wagtail/admin/tests/test_views_generic.py +34 -0
- wagtail/admin/tests/test_workflows.py +34 -0
- wagtail/admin/tests/viewsets/test_model_viewset.py +322 -0
- wagtail/admin/ui/tables/orderable.py +73 -0
- wagtail/admin/ui/tables/pages.py +3 -13
- wagtail/admin/userbar.py +6 -1
- wagtail/admin/views/collection_privacy.py +6 -2
- wagtail/admin/views/generic/__init__.py +1 -0
- wagtail/admin/views/generic/mixins.py +20 -2
- wagtail/admin/views/generic/models.py +67 -1
- wagtail/admin/views/generic/ordering.py +79 -0
- wagtail/admin/views/home.py +3 -3
- wagtail/admin/views/page_privacy.py +5 -2
- wagtail/admin/views/pages/create.py +1 -1
- wagtail/admin/views/pages/edit.py +2 -2
- wagtail/admin/views/pages/listing.py +7 -42
- wagtail/admin/views/pages/move.py +1 -1
- wagtail/admin/views/pages/ordering.py +1 -1
- wagtail/admin/viewsets/base.py +1 -1
- wagtail/admin/viewsets/model.py +49 -1
- wagtail/admin/wagtail_hooks.py +2 -1
- wagtail/admin/widgets/slug.py +10 -10
- wagtail/api/v2/serializers.py +1 -1
- wagtail/api/v2/tests/test_renderer_classes.py +32 -0
- wagtail/apps.py +2 -0
- wagtail/bin/wagtail.py +1 -1
- wagtail/blocks/struct_block.py +2 -1
- wagtail/contrib/forms/locale/en/LC_MESSAGES/django.po +14 -14
- wagtail/contrib/forms/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/nl/LC_MESSAGES/django.po +19 -2
- wagtail/contrib/forms/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/forms/locale/ru/LC_MESSAGES/django.po +18 -1
- wagtail/contrib/frontend_cache/tests.py +4 -2
- wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po +4 -4
- wagtail/contrib/redirects/tests/test_tmp_storages.py +20 -0
- wagtail/contrib/redirects/tmp_storages.py +1 -1
- wagtail/contrib/redirects/views.py +3 -3
- wagtail/contrib/search_promotions/locale/en/LC_MESSAGES/django.po +3 -3
- wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.po +43 -3
- wagtail/contrib/search_promotions/static/wagtailsearchpromotions/js/query-chooser-modal.js +1 -1
- wagtail/contrib/search_promotions/views/settings.py +2 -2
- wagtail/contrib/settings/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/settings/locale/cs/LC_MESSAGES/django.po +6 -1
- wagtail/contrib/settings/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/settings/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/settings/locale/nl/LC_MESSAGES/django.po +6 -2
- wagtail/contrib/settings/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/contrib/settings/locale/ru/LC_MESSAGES/django.po +6 -1
- wagtail/contrib/settings/tests/site_specific/test_admin.py +40 -6
- wagtail/contrib/simple_translation/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/styleguide/templates/wagtailstyleguide/base.html +5 -5
- wagtail/contrib/table_block/blocks.py +1 -0
- wagtail/contrib/table_block/locale/en/LC_MESSAGES/django.po +5 -1
- wagtail/contrib/table_block/static/table_block/js/table.js +1 -1
- wagtail/contrib/typed_table_block/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/contrib/typed_table_block/static/typed_table_block/js/typed_table_block.js +1 -1
- wagtail/coreutils.py +5 -5
- wagtail/documents/forms.py +18 -1
- wagtail/documents/locale/en/LC_MESSAGES/django.po +10 -10
- wagtail/documents/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/nl/LC_MESSAGES/django.po +9 -0
- wagtail/documents/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/documents/locale/ru/LC_MESSAGES/django.po +9 -0
- wagtail/documents/models.py +1 -1
- wagtail/documents/static/wagtaildocs/js/add-multiple.js +1 -1
- wagtail/documents/static/wagtaildocs/js/document-chooser-modal.js +1 -1
- wagtail/documents/static/wagtaildocs/js/document-chooser-telepath.js +1 -1
- wagtail/documents/static/wagtaildocs/js/document-chooser.js +1 -1
- wagtail/documents/templates/wagtaildocs/documents/add.html +0 -34
- wagtail/documents/tests/test_admin_views.py +132 -26
- wagtail/documents/tests/test_collection_privacy.py +18 -4
- wagtail/documents/tests/test_form_overrides.py +1 -1
- wagtail/documents/tests/test_search.py +21 -8
- wagtail/documents/views/documents.py +1 -1
- wagtail/embeds/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/embeds/static/wagtailembeds/js/embed-chooser-modal.js +1 -1
- wagtail/images/forms.py +16 -1
- wagtail/images/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/cs/LC_MESSAGES/django.po +12 -1
- wagtail/images/locale/en/LC_MESSAGES/django.po +57 -46
- wagtail/images/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/nl/LC_MESSAGES/django.po +37 -14
- wagtail/images/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/images/locale/ru/LC_MESSAGES/django.po +20 -1
- wagtail/images/models.py +1 -1
- wagtail/images/static/wagtailimages/js/add-multiple.js +1 -1
- wagtail/images/static/wagtailimages/js/focal-point-chooser.js +1 -1
- wagtail/images/static/wagtailimages/js/image-block.js +1 -1
- wagtail/images/static/wagtailimages/js/image-chooser-modal.js +1 -1
- wagtail/images/static/wagtailimages/js/image-chooser-telepath.js +1 -1
- wagtail/images/static/wagtailimages/js/image-chooser.js +1 -1
- wagtail/images/static/wagtailimages/js/image-url-generator.js +1 -1
- wagtail/images/static/wagtailimages/js/vendor/jquery.Jcrop.min.js +1 -1
- wagtail/images/static/wagtailimages/js/vendor/jquery.fileupload-image.js +1 -1
- wagtail/images/static/wagtailimages/js/vendor/jquery.fileupload-validate.js +1 -1
- wagtail/images/static/wagtailimages/js/vendor/load-image.min.js +1 -1
- wagtail/images/templates/wagtailimages/chooser/chooser.html +22 -13
- wagtail/images/templates/wagtailimages/chooser/image_preview_column_cell.html +10 -0
- wagtail/images/templates/wagtailimages/chooser/results.html +24 -20
- wagtail/images/templates/wagtailimages/chooser/title_column_cell.html +15 -0
- wagtail/images/templates/wagtailimages/images/add.html +0 -34
- wagtail/images/templates/wagtailimages/images/index.html +3 -3
- wagtail/images/templates/wagtailimages/images/index_results.html +1 -1
- wagtail/images/templates/wagtailimages/images/layout_toggle_button.html +8 -7
- wagtail/images/templatetags/wagtailimages_tags.py +2 -2
- wagtail/images/tests/test_admin_views.py +87 -0
- wagtail/images/tests/test_form_overrides.py +1 -1
- wagtail/images/tests/test_models.py +48 -9
- wagtail/images/views/chooser.py +66 -2
- wagtail/locale/en/LC_MESSAGES/django.po +55 -55
- wagtail/locale/is_IS/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/is_IS/LC_MESSAGES/django.po +3 -3
- wagtail/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/nl/LC_MESSAGES/django.po +11 -2
- wagtail/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/locale/ru/LC_MESSAGES/django.po +11 -1
- wagtail/locales/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/locales/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/locales/locale/nl/LC_MESSAGES/django.po +12 -1
- wagtail/locales/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/locales/locale/ru/LC_MESSAGES/django.po +10 -1
- wagtail/locales/views.py +2 -2
- wagtail/models/orderable.py +10 -0
- wagtail/models/pages.py +9 -11
- wagtail/models/sites.py +1 -1
- wagtail/models/workflows.py +8 -5
- wagtail/project_template/home/tests.py +6 -7
- wagtail/project_template/project_name/settings/base.py +9 -9
- wagtail/project_template/requirements.txt +1 -1
- wagtail/query.py +7 -2
- wagtail/rich_text/rewriters.py +1 -1
- wagtail/search/apps.py +4 -49
- wagtail/search/backends/__init__.py +1 -113
- wagtail/search/backends/base.py +1 -547
- wagtail/search/backends/database/__init__.py +1 -50
- wagtail/search/backends/database/fallback.py +1 -253
- wagtail/search/backends/database/mysql/mysql.py +1 -700
- wagtail/search/backends/database/mysql/query.py +1 -258
- wagtail/search/backends/database/postgres/postgres.py +1 -749
- wagtail/search/backends/database/postgres/query.py +1 -83
- wagtail/search/backends/database/postgres/weights.py +1 -63
- wagtail/search/backends/database/sqlite/query.py +1 -294
- wagtail/search/backends/database/sqlite/sqlite.py +1 -719
- wagtail/search/backends/database/sqlite/utils.py +1 -35
- wagtail/search/backends/deprecation.py +45 -0
- wagtail/search/backends/elasticsearch7.py +18 -1260
- wagtail/search/backends/elasticsearch8.py +21 -96
- wagtail/search/backends/elasticsearch9.py +35 -0
- wagtail/search/backends/opensearch2.py +35 -0
- wagtail/search/backends/opensearch3.py +35 -0
- wagtail/search/index.py +1 -358
- wagtail/search/locale/en/LC_MESSAGES/django.po +2 -10
- wagtail/search/management/commands/update_index.py +1 -205
- wagtail/search/management/commands/wagtail_update_index.py +1 -4
- wagtail/search/models.py +32 -158
- wagtail/search/query.py +1 -114
- wagtail/search/queryset.py +1 -43
- wagtail/search/signal_handlers.py +1 -24
- wagtail/search/tasks.py +1 -10
- wagtail/search/tests/test_elasticsearch.py +22 -0
- wagtail/search/utils.py +1 -206
- wagtail/sites/locale/en/LC_MESSAGES/django.po +1 -1
- wagtail/snippets/locale/en/LC_MESSAGES/django.po +3 -3
- wagtail/snippets/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/ru/LC_MESSAGES/django.po +8 -1
- wagtail/snippets/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/snippets/locale/tr/LC_MESSAGES/django.po +8 -1
- wagtail/snippets/static/wagtailsnippets/js/snippet-chooser-telepath.js +1 -1
- wagtail/snippets/static/wagtailsnippets/js/snippet-chooser.js +1 -1
- wagtail/snippets/tests/test_preview.py +5 -6
- wagtail/snippets/tests/test_reordering.py +319 -0
- wagtail/snippets/tests/test_snippets.py +65 -12
- wagtail/snippets/views/snippets.py +16 -0
- wagtail/test/numberformat.py +30 -0
- wagtail/test/settings.py +35 -12
- wagtail/test/testapp/fields.py +12 -0
- wagtail/test/testapp/migrations/0056_commentablejsonpage.py +50 -0
- wagtail/test/testapp/migrations/0057_featurecompletetoy_sort_order.py +23 -0
- wagtail/test/testapp/migrations/0058_customlocktask.py +31 -0
- wagtail/test/testapp/models.py +27 -0
- wagtail/test/testapp/urls.py +1 -0
- wagtail/test/testapp/views.py +18 -2
- wagtail/test/utils/page_tests.py +17 -17
- wagtail/test/utils/template_tests.py +4 -6
- wagtail/test/utils/wagtail_tests.py +1 -2
- wagtail/tests/test_blocks.py +15 -0
- wagtail/tests/test_page_model.py +15 -0
- wagtail/{search/tests → tests}/test_page_search.py +29 -2
- wagtail/tests/test_search_fields.py +69 -0
- wagtail/tests/test_tests.py +62 -6
- wagtail/tests/test_workflow.py +25 -1
- wagtail/users/locale/cs/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/cs/LC_MESSAGES/django.po +3 -0
- wagtail/users/locale/en/LC_MESSAGES/django.po +2 -2
- wagtail/users/locale/nl/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/nl/LC_MESSAGES/django.po +6 -3
- wagtail/users/locale/ru/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/ru/LC_MESSAGES/django.po +5 -1
- wagtail/users/locale/tr/LC_MESSAGES/django.mo +0 -0
- wagtail/users/locale/tr/LC_MESSAGES/django.po +78 -4
- wagtail/users/templates/wagtailusers/users/create.html +2 -0
- wagtail/users/templates/wagtailusers/users/edit.html +2 -0
- wagtail/users/tests/test_admin_views.py +4 -0
- wagtail/users/views/users.py +1 -1
- {wagtail-7.1.1.dist-info → wagtail-7.2rc1.dist-info}/METADATA +7 -6
- {wagtail-7.1.1.dist-info → wagtail-7.2rc1.dist-info}/RECORD +322 -328
- wagtail/admin/templates/wagtailadmin/collection_privacy/set_privacy.html +0 -13
- wagtail/admin/templates/wagtailadmin/page_privacy/set_privacy.html +0 -13
- wagtail/search/tests/__init__.py +0 -0
- wagtail/search/tests/elasticsearch_common_tests.py +0 -251
- wagtail/search/tests/test_backends.py +0 -1215
- wagtail/search/tests/test_db_backend.py +0 -62
- wagtail/search/tests/test_elasticsearch7_backend.py +0 -1452
- wagtail/search/tests/test_elasticsearch8_backend.py +0 -15
- wagtail/search/tests/test_index_functions.py +0 -256
- wagtail/search/tests/test_indexed_class.py +0 -157
- wagtail/search/tests/test_mysql_backend.py +0 -192
- wagtail/search/tests/test_postgres_backend.py +0 -210
- wagtail/search/tests/test_queries.py +0 -332
- wagtail/search/tests/test_related_fields.py +0 -102
- wagtail/search/tests/test_sqlite_backend.py +0 -52
- wagtail/test/search/__init__.py +0 -0
- wagtail/test/search/apps.py +0 -9
- wagtail/test/search/fixtures/search.json +0 -545
- wagtail/test/search/migrations/0001_initial.py +0 -146
- wagtail/test/search/migrations/0002_bookunindexed.py +0 -43
- wagtail/test/search/migrations/0003_book_summary.py +0 -18
- wagtail/test/search/migrations/__init__.py +0 -0
- wagtail/test/search/models.py +0 -137
- /wagtail/admin/templates/wagtailadmin/{pages/listing/_ordering_cell.html → tables/ordering_cell.html} +0 -0
- /wagtail/{search/checks.py → checks.py} +0 -0
- {wagtail-7.1.1.dist-info → wagtail-7.2rc1.dist-info}/WHEEL +0 -0
- {wagtail-7.1.1.dist-info → wagtail-7.2rc1.dist-info}/entry_points.txt +0 -0
- {wagtail-7.1.1.dist-info → wagtail-7.2rc1.dist-info}/licenses/LICENSE +0 -0
- {wagtail-7.1.1.dist-info → wagtail-7.2rc1.dist-info}/top_level.txt +0 -0
|
@@ -20,7 +20,7 @@ msgstr ""
|
|
|
20
20
|
"Report-Msgid-Bugs-To: \n"
|
|
21
21
|
"POT-Creation-Date: 2025-07-24 16:20+0200\n"
|
|
22
22
|
"PO-Revision-Date: 2014-02-20 21:05+0000\n"
|
|
23
|
-
"Last-Translator:
|
|
23
|
+
"Last-Translator: Storm Heg <storm@stormbase.digital>, 2021-2025\n"
|
|
24
24
|
"Language-Team: Dutch (http://app.transifex.com/torchbox/wagtail/language/"
|
|
25
25
|
"nl/)\n"
|
|
26
26
|
"MIME-Version: 1.0\n"
|
|
@@ -56,7 +56,7 @@ msgstr "Ondersteunde bestandsformaten: %(supported_formats)s."
|
|
|
56
56
|
#, python-format
|
|
57
57
|
msgid "Not a supported image format. Supported formats: %(supported_formats)s."
|
|
58
58
|
msgstr ""
|
|
59
|
-
"Geen ondersteund afbeeldingsformaat.
|
|
59
|
+
"Geen ondersteund afbeeldingsformaat. Ondersteunde formaten: "
|
|
60
60
|
"%(supported_formats)s."
|
|
61
61
|
|
|
62
62
|
#, python-format
|
|
@@ -79,8 +79,9 @@ msgid ""
|
|
|
79
79
|
"This file has too many pixels (%(num_pixels)s). Maximum pixels "
|
|
80
80
|
"%(max_pixels_count)s."
|
|
81
81
|
msgstr ""
|
|
82
|
-
"
|
|
83
|
-
"toegestane pixels is %(max_pixels_count)s."
|
|
82
|
+
"Deze afbeelding bevat teveel pixels (%(num_pixels)s). Het maximum aantal "
|
|
83
|
+
"toegestane pixels is %(max_pixels_count)s. Snij de afbeelding bij of verlaag "
|
|
84
|
+
"de resolutie en probeer het opnieuw."
|
|
84
85
|
|
|
85
86
|
#, python-format
|
|
86
87
|
msgid "This file is too big. Maximum filesize %(max_filesize)s."
|
|
@@ -129,7 +130,7 @@ msgid "Height"
|
|
|
129
130
|
msgstr "Hoogte"
|
|
130
131
|
|
|
131
132
|
msgid "Closeness"
|
|
132
|
-
msgstr "
|
|
133
|
+
msgstr "Uitsnijdingsniveau rondom focusgebied"
|
|
133
134
|
|
|
134
135
|
msgid "Add"
|
|
135
136
|
msgstr "Toevoegen"
|
|
@@ -168,7 +169,7 @@ msgid "created at"
|
|
|
168
169
|
msgstr "gemaakt op"
|
|
169
170
|
|
|
170
171
|
msgid "uploaded by user"
|
|
171
|
-
msgstr "
|
|
172
|
+
msgstr "geüpload door gebruiker"
|
|
172
173
|
|
|
173
174
|
msgid "tags"
|
|
174
175
|
msgstr "tags"
|
|
@@ -267,8 +268,9 @@ msgid ""
|
|
|
267
268
|
"Upload successful. However, your new image seems to be a duplicate of an "
|
|
268
269
|
"existing image. You may delete it if it wasn't required."
|
|
269
270
|
msgstr ""
|
|
270
|
-
"Upload is geslaagd.
|
|
271
|
-
"bestaande afbeelding
|
|
271
|
+
"Upload is geslaagd. Maar je nieuwe afbeelding lijkt op een dubbeling van een "
|
|
272
|
+
"bestaande afbeelding. Misschien was de upload niet nodig en kun je deze "
|
|
273
|
+
"afbeelding verwijderen?"
|
|
272
274
|
|
|
273
275
|
msgid "Existing"
|
|
274
276
|
msgstr "Bestaand"
|
|
@@ -295,6 +297,15 @@ msgstr "Je hebt nog geen afbeelding geüpload naar deze collectie."
|
|
|
295
297
|
msgid "You haven't uploaded any images."
|
|
296
298
|
msgstr "Je hebt nog geen afbeeldingen geüpload."
|
|
297
299
|
|
|
300
|
+
msgid ""
|
|
301
|
+
"Why not <a class=\"upload-one-now\" href=\"#tab-upload\" data-action=\"w-"
|
|
302
|
+
"tabs#select:prevent\" data-w-tabs-target=\"trigger\" data-w-tabs-focus-"
|
|
303
|
+
"param=\"true\">upload one now</a>?"
|
|
304
|
+
msgstr ""
|
|
305
|
+
"Waarom <a class=\"upload-one-now\" href=\"#tab-upload\" data-action=\"w-"
|
|
306
|
+
"tabs#select:prevent\" data-w-tabs-target=\"trigger\" data-w-tabs-focus-"
|
|
307
|
+
"param=\"true\">upload je er niet eentje</a>?"
|
|
308
|
+
|
|
298
309
|
msgid "Choose a format"
|
|
299
310
|
msgstr "Kies een formaat"
|
|
300
311
|
|
|
@@ -381,7 +392,9 @@ msgstr "Selecteer alle afbeeldingen in lijst"
|
|
|
381
392
|
|
|
382
393
|
#, python-format
|
|
383
394
|
msgid "Sorry, no images match \"<em>%(query_string)s</em>\""
|
|
384
|
-
msgstr "
|
|
395
|
+
msgstr ""
|
|
396
|
+
"Sorry, geen enkele afbeelding komt overeen met je zoekopdracht: "
|
|
397
|
+
"<em>%(query_string)s</em>"
|
|
385
398
|
|
|
386
399
|
#, python-format
|
|
387
400
|
msgid ""
|
|
@@ -399,6 +412,9 @@ msgstr ""
|
|
|
399
412
|
"Er zijn nog geen afbeeldingen toegevoegd. Waarom <a "
|
|
400
413
|
"href=\"%(wagtailimages_add_image_url)s\">upload je er niet nu een</a>?"
|
|
401
414
|
|
|
415
|
+
msgid "Toggle layout"
|
|
416
|
+
msgstr "Wijzig layout"
|
|
417
|
+
|
|
402
418
|
msgid "Preview"
|
|
403
419
|
msgstr "Voorbeeld"
|
|
404
420
|
|
|
@@ -448,14 +464,15 @@ msgid ""
|
|
|
448
464
|
"Upload successful. However, your new image seems to be a duplicate of this "
|
|
449
465
|
"existing image. You may delete it if it wasn't required."
|
|
450
466
|
msgstr ""
|
|
451
|
-
"Upload is geslaagd.
|
|
452
|
-
"bestaande afbeelding te zijn. Je kunt
|
|
467
|
+
"Upload is geslaagd. Maar je nieuwe afbeelding lijkt een dubbeling van deze "
|
|
468
|
+
"bestaande afbeelding te zijn. Je kunt je net geüploade afbeelding "
|
|
469
|
+
"verwijderen indien nodig"
|
|
453
470
|
|
|
454
471
|
msgid "Sorry, upload failed."
|
|
455
|
-
msgstr "Sorry, upload
|
|
472
|
+
msgstr "Sorry, de upload is mislukt"
|
|
456
473
|
|
|
457
474
|
msgid "Server Error"
|
|
458
|
-
msgstr "
|
|
475
|
+
msgstr "Serverfout"
|
|
459
476
|
|
|
460
477
|
msgid ""
|
|
461
478
|
"Report this error to your website administrator with the following "
|
|
@@ -538,6 +555,12 @@ msgstr "Bestandsgrootte: (klein naar groot)"
|
|
|
538
555
|
msgid "File size: (high to low)"
|
|
539
556
|
msgstr "Bestandsgrootte: (groot naar klein)"
|
|
540
557
|
|
|
558
|
+
msgid "Usage count: (low to high)"
|
|
559
|
+
msgstr "Aantal keer gebruikt (weinig tot vaak)"
|
|
560
|
+
|
|
561
|
+
msgid "Usage count: (high to low)"
|
|
562
|
+
msgstr "Aantal keer gebruikt (vaak tot weinig)"
|
|
563
|
+
|
|
541
564
|
msgid "Images"
|
|
542
565
|
msgstr "Afbeeldingen"
|
|
543
566
|
|
|
@@ -558,7 +581,7 @@ msgid ""
|
|
|
558
581
|
"The source image file could not be found. Please change the source or delete "
|
|
559
582
|
"the image."
|
|
560
583
|
msgstr ""
|
|
561
|
-
"Het bronbestand van de afbeelding kon niet worden gevonden.
|
|
584
|
+
"Het bronbestand van de afbeelding kon niet worden gevonden. Upload een nieuw "
|
|
562
585
|
"bronbestand of verwijder de afbeelding."
|
|
563
586
|
|
|
564
587
|
msgid "Generate URL"
|
|
Binary file
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
# sergeybe <sergeybe@gmail.com>, 2020
|
|
24
24
|
# Sergey Komarov <sjkomarov@gmail.com>, 2014
|
|
25
25
|
# 2a01ec1f91c141c338f53ad8cc23abc6_8deca2d, 2021
|
|
26
|
+
# Twixxik, 2025
|
|
26
27
|
# Влад <integration.into.society@gmail.com>, 2022
|
|
27
28
|
# Влад <integration.into.society@gmail.com>, 2021-2022
|
|
28
29
|
# Мирон Левицкий <miron200504@gmail.com>, 2018
|
|
@@ -36,7 +37,7 @@ msgstr ""
|
|
|
36
37
|
"Report-Msgid-Bugs-To: \n"
|
|
37
38
|
"POT-Creation-Date: 2025-07-24 16:20+0200\n"
|
|
38
39
|
"PO-Revision-Date: 2014-02-20 21:05+0000\n"
|
|
39
|
-
"Last-Translator:
|
|
40
|
+
"Last-Translator: Twixxik, 2025\n"
|
|
40
41
|
"Language-Team: Russian (http://app.transifex.com/torchbox/wagtail/language/"
|
|
41
42
|
"ru/)\n"
|
|
42
43
|
"MIME-Version: 1.0\n"
|
|
@@ -327,6 +328,15 @@ msgstr "Вы не загрузили ни одного изображения в
|
|
|
327
328
|
msgid "You haven't uploaded any images."
|
|
328
329
|
msgstr "Вы не загрузили ни одного изображения."
|
|
329
330
|
|
|
331
|
+
msgid ""
|
|
332
|
+
"Why not <a class=\"upload-one-now\" href=\"#tab-upload\" data-action=\"w-"
|
|
333
|
+
"tabs#select:prevent\" data-w-tabs-target=\"trigger\" data-w-tabs-focus-"
|
|
334
|
+
"param=\"true\">upload one now</a>?"
|
|
335
|
+
msgstr ""
|
|
336
|
+
"Почему бы не <a class=\"upload-one-now\" href=\"#tab-upload\" data-"
|
|
337
|
+
"action=\"w-tabs#select:prevent\" data-w-tabs-target=\"trigger\" data-w-tabs-"
|
|
338
|
+
"focus-param=\"true\">загрузить один сейчас</a>?"
|
|
339
|
+
|
|
330
340
|
msgid "Choose a format"
|
|
331
341
|
msgstr "Выберите формат"
|
|
332
342
|
|
|
@@ -441,6 +451,9 @@ msgstr ""
|
|
|
441
451
|
"Вы не загрузили ни одного изображения. Почему бы <a "
|
|
442
452
|
"href=\"%(wagtailimages_add_image_url)s\">не загрузить сейчас</a>?"
|
|
443
453
|
|
|
454
|
+
msgid "Toggle layout"
|
|
455
|
+
msgstr "Изменить макет"
|
|
456
|
+
|
|
444
457
|
msgid "Preview"
|
|
445
458
|
msgstr "Превью"
|
|
446
459
|
|
|
@@ -588,6 +601,12 @@ msgstr "Размер файла: (от меньшего к большему)"
|
|
|
588
601
|
msgid "File size: (high to low)"
|
|
589
602
|
msgstr "Размер файла: (от большого к меньшему)"
|
|
590
603
|
|
|
604
|
+
msgid "Usage count: (low to high)"
|
|
605
|
+
msgstr "Количество использований: (по возрастанию)"
|
|
606
|
+
|
|
607
|
+
msgid "Usage count: (high to low)"
|
|
608
|
+
msgstr "Количество использований: (по убыванию)"
|
|
609
|
+
|
|
591
610
|
msgid "Images"
|
|
592
611
|
msgstr "Изображения"
|
|
593
612
|
|
wagtail/images/models.py
CHANGED
|
@@ -191,7 +191,7 @@ class ImageFileMixin:
|
|
|
191
191
|
else:
|
|
192
192
|
# Some external storage backends don't allow reopening
|
|
193
193
|
# the file. Get a fresh file instance. #1397
|
|
194
|
-
storage = self.
|
|
194
|
+
storage = self.file.storage
|
|
195
195
|
image_file = storage.open(self.file.name, "rb")
|
|
196
196
|
|
|
197
197
|
close_file = True
|
|
@@ -1 +1 @@
|
|
|
1
|
-
$(
|
|
1
|
+
$(function(){$("#fileupload").fileupload({dataType:"html",sequentialUploads:!0,dropZone:$(".drop-zone"),previewMinWidth:150,previewMaxWidth:150,previewMinHeight:150,previewMaxHeight:150,add:function(e,t){var a=$(this),o=a.data("blueimp-fileupload")||a.data("fileupload"),s=$($("#upload-list-item").html()).addClass("upload-uploading"),i=o.options;$("#upload-list").append(s),t.context=s,t.process(function(){return a.fileupload("process",t)}).always(function(){t.context.removeClass("processing"),t.context.find(".left").each(function(e,a){$(a).append(escapeHtml(t.files[e].name))}),t.context.find(".preview .thumb").each(function(e,a){$(a).find(".icon").remove(),$(a).append(t.files[e].preview)})}).done(function(){t.context.find(".start").prop("disabled",!1),!1!==o._trigger("added",e,t)&&(i.autoUpload||t.autoUpload)&&!1!==t.autoUpload&&t.submit()}).fail(function(){t.files.error&&t.context.each(function(e){var a=t.files[e].error;a&&$(this).find(".error_messages").html(a)})})},processfail:function(e,t){$(t.context).removeClass("upload-uploading").addClass("upload-failure")},progress:function(e,t){if(e.isDefaultPrevented())return!1;var a=Math.floor(t.loaded/t.total*100);t.context.each(function(){$(this).find(".progress").addClass("active").attr("aria-valuenow",a).find(".bar").css("width",a+"%").html(a+"%")})},progressall:function(e,t){var a=parseInt(t.loaded/t.total*100,10);$("#overall-progress").addClass("active").attr("aria-valuenow",a).find(".bar").css("width",a+"%").html(a+"%"),a>=100&&$("#overall-progress").removeClass("active").find(".bar").css("width","0%")},formData:function(e){var t=this.files[0].name,a={title:t.replace(/\.[^.]+$/,"")};return e.get(0).dispatchEvent(new CustomEvent("wagtail:images-upload",{bubbles:!0,cancelable:!0,detail:{data:a,filename:t,maxTitleLength:this.maxTitleLength}}))?e.serializeArray().concat({name:"title",value:a.title}):e.serializeArray()},done:function(e,t){var a=$(t.context),o=JSON.parse(t.result);o.success?o.duplicate?(a.addClass("upload-duplicate"),$(".right",a).append(o.confirm_duplicate_upload),$(".confirm-duplicate-upload",a).on("click",".confirm-upload",function(e){e.preventDefault(),$(this).closest(".confirm-duplicate-upload").remove(),$(".right",a).append(o.form)})):(a.addClass("upload-success"),$(".right",a).append(o.form)):(a.addClass("upload-failure"),$(".right .error_messages",a).append(o.error_message))},fail:function(e,t){var a=$(t.context),o=$(".server-error",a);$(".error-text",o).text(t.errorThrown),$(".error-code",o).text(t.jqXHR.status),a.addClass("upload-server-error")},always:function(e,t){$(t.context).removeClass("upload-uploading").addClass("upload-complete")}}),$("#upload-list").on("submit","form",function(e){var t=$(this),a=new FormData(this),o=t.closest("#upload-list > li");e.preventDefault(),$.ajax({contentType:!1,data:a,processData:!1,type:"POST",url:this.action}).done(function(e){if(e.success){var a=$(".status-msg.update-success").first().text();document.dispatchEvent(new CustomEvent("w-messages:add",{detail:{clear:!0,text:a,type:"success"}})),o.slideUp(function(){$(this).remove()})}else t.replaceWith(e.form)})}),$("#upload-list").on("click",".delete",function(e){var t=$(this).closest("form"),a=t.closest("#upload-list > li");e.preventDefault();var o=$('input[name="csrfmiddlewaretoken"]',t).val();$.post(this.href,{csrfmiddlewaretoken:o},function(e){e.success&&a.slideUp(function(){$(this).remove()})})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var jcropapi;function setupJcrop(t,i,o,e){t.Jcrop({trueSize:[i.width,i.height],bgColor:"rgb(192, 192, 192)",onSelect:function(t){var i=Math.floor((t.x+t.x2)/2),o=Math.floor((t.y+t.y2)/2),a=Math.floor(t.w),h=Math.floor(t.h);e.x.val(i),e.y.val(o),e.width.val(a),e.height.val(h)},onRelease:function(){e.x.val(o.x),e.y.val(o.y),e.width.val(o.width),e.height.val(o.height)}},
|
|
1
|
+
var jcropapi;function setupJcrop(t,i,o,e){t.Jcrop({trueSize:[i.width,i.height],bgColor:"rgb(192, 192, 192)",onSelect:function(t){var i=Math.floor((t.x+t.x2)/2),o=Math.floor((t.y+t.y2)/2),a=Math.floor(t.w),h=Math.floor(t.h);e.x.val(i),e.y.val(o),e.width.val(a),e.height.val(h)},onRelease:function(){e.x.val(o.x),e.y.val(o.y),e.width.val(o.width),e.height.val(o.height)}},function(){jcropapi=this,$("img",this.ui.holder).attr("alt","");const t=o.label;if(!t)return;const i="jcrop-holder-input";$("input",this.ui.holder).attr("id",i);const e=document.createElement("label");e.setAttribute("for",i),e.classList.add("w-sr-only"),e.textContent=t,document.getElementsByClassName("jcrop-holder")[0].prepend(e)})}$(function(){var t=$("div.focal-point-chooser"),i=$(".current-focal-point-indicator",t),o=$("img",t),e={width:o.data("originalWidth"),height:o.data("originalHeight")},a={label:t.data("focalInputLabel"),x:t.data("focalPointX"),y:t.data("focalPointY"),width:t.data("focalPointWidth"),height:t.data("focalPointHeight")},h={x:$("input.focal_point_x"),y:$("input.focal_point_y"),width:$("input.focal_point_width"),height:$("input.focal_point_height")},l=a.x-a.width/2,r=a.y-a.height/2,n=a.width,c=a.height;t.css("max-height",t.data("max-height")),t.css("max-width",t.data("max-width")),i.css("left",100*l/e.width+"%"),i.css("top",100*r/e.height+"%"),i.css("width",100*n/e.width+"%"),i.css("height",100*c/e.height+"%");var d=[o,e,a,h];setupJcrop.apply(this,d),$(window).on("resize",$.debounce(300,function(){jcropapi.destroy(),o.removeAttr("style"),$(".jcrop-holder").remove(),setupJcrop.apply(this,d)})),$(".remove-focal-point").on("click",function(){jcropapi.destroy(),o.removeAttr("style"),$(".jcrop-holder").remove(),$(".current-focal-point-indicator").remove(),h.x.val(""),h.y.val(""),h.width.val(""),h.height.val(""),setupJcrop.apply(this,d)})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{class e extends window.wagtailStreamField.blocks.StructBlockDefinition{render(e,t,a,d){const l=super.render(e,t,a,d),i=document.getElementById(`${t}-alt_text`),n=document.getElementById(`${t}-decorative`),c=()=>{n.checked?i.setAttribute("disabled",!0):i.removeAttribute("disabled")};c(),n.addEventListener("change",c);const r=l.childBlocks.image.widget;let s=a?.image?.default_alt_text||"";return r.addEventListener("chosen",(
|
|
1
|
+
(()=>{class e extends window.wagtailStreamField.blocks.StructBlockDefinition{render(e,t,a,d){const l=super.render(e,t,a,d),i=document.getElementById(`${t}-alt_text`),n=document.getElementById(`${t}-decorative`),c=()=>{n.checked?i.setAttribute("disabled",!0):i.removeAttribute("disabled")};c(),n.addEventListener("change",c);const r=l.childBlocks.image.widget;let s=a?.image?.default_alt_text||"";return r.addEventListener("chosen",({detail:e})=>{i.value===s&&(i.value=e.default_alt_text),s=e.default_alt_text}),l}}window.telepath.register("wagtail.images.blocks.ImageBlock",e)})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,
|
|
1
|
+
(()=>{"use strict";var e,t={1669:e=>{e.exports=jQuery},3188:(e,t,o)=>{var r=o(1669),a=o.n(r),n=o(2614);class i extends n.C4{ajaxifyLinks(e,t){super.ajaxifyLinks(e,t),a()("a.upload-one-now").on("click",e=>{const t=a()("#id_collection_id").val();t&&a()("#id_image-chooser-upload-collection").val(t),e.preventDefault()})}onLoadChooseStep(e){super.onLoadChooseStep(e),a()("a.suggested-tag").on("click",e=>(a()("#id_q").val(""),this.searchController.search({tag:a()(e.currentTarget).text(),collection_id:a()("#id_collection_id").val()}),!1))}onLoadDuplicateFoundStep(e,t){a()("#tab-upload",e.body).replaceWith(t.htmlFragment),a()(".use-new-image",e.body).on("click",t=>(e.loadUrl(t.currentTarget.href),!1)),a()(".use-existing-image",e.body).on("click",t=>{var o=a()(t.currentTarget).closest("form"),r=a()('input[name="csrfmiddlewaretoken"]',o).val();return e.postForm(t.currentTarget.href,{csrfmiddlewaretoken:r}),!1})}onLoadSelectFormatStep(e){var t=document.querySelector("#id_image-chooser-insertion-image_is_decorative"),o=document.querySelector("#id_image-chooser-insertion-alt_text"),r=document.querySelector('[for="id_image-chooser-insertion-alt_text"]');function n(){o.setAttribute("disabled","disabled"),r.classList.remove("required")}function i(){o.removeAttribute("disabled"),r.classList.add("required")}t.checked?n():i(),t.addEventListener("change",e=>{e.target.checked?n():i()}),a()("form",e.body).on("submit",t=>(a().post(t.currentTarget.action,a()(t.currentTarget).serialize(),e.loadResponseText,"text"),!1))}getOnLoadHandlers(){const e=super.getOnLoadHandlers();return e.duplicate_found=(e,t)=>{this.onLoadDuplicateFoundStep(e,t)},e.select_format=(e,t)=>{this.onLoadSelectFormatStep(e,t)},e}}window.IMAGE_CHOOSER_MODAL_ONLOAD_HANDLERS=new i({creationFormTabSelector:"#tab-upload"}).getOnLoadHandlers();class l extends n.ZZ{onloadHandlers=window.IMAGE_CHOOSER_MODAL_ONLOAD_HANDLERS}window.ImageChooserModal=l}},o={};function r(e){var a=o[e];if(void 0!==a)return a.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,r),n.exports}r.m=t,e=[],r.O=(t,o,a,n)=>{if(!o){var i=1/0;for(c=0;c<e.length;c++){for(var[o,a,n]=e[c],l=!0,d=0;d<o.length;d++)(!1&n||i>=n)&&Object.keys(r.O).every(e=>r.O[e](o[d]))?o.splice(d--,1):(l=!1,n<i&&(i=n));if(l){e.splice(c--,1);var s=a();void 0!==s&&(t=s)}}return t}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[o,a,n]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.j=678,(()=>{var e={678:0};r.O.j=t=>0===e[t];var t=(t,o)=>{var a,n,[i,l,d]=o,s=0;if(i.some(t=>0!==e[t])){for(a in l)r.o(l,a)&&(r.m[a]=l[a]);if(d)var c=d(r)}for(t&&t(o);s<i.length;s++)n=i[s],r.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return r.O(c)},o=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var a=r.O(void 0,[321],()=>r(3188));a=r.O(a)})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t={7199:(e,t,r)=>{var i=r(9465);class a extends i.y{chooserModalClass=ImageChooserModal;initHTMLElements(e){super.initHTMLElements(e),this.previewImage=this.chooserElement.querySelector("[data-chooser-image]")}getStateFromHTML(){const e=super.getStateFromHTML();return e&&(e.preview={url:this.previewImage.getAttribute("src"),width:this.previewImage.getAttribute("width"),height:this.previewImage.getAttribute("height")},e.default_alt_text=this.previewImage.getAttribute("data-default-alt-text")),e}renderState(e){super.renderState(e),this.previewImage.setAttribute("src",e.preview.url),this.previewImage.setAttribute("width",e.preview.width),this.previewImage.setAttribute("data-default-alt-text",e.default_alt_text)}}class o extends i._{widgetClass=a;chooserModalClass=ImageChooserModal}window.telepath.register("wagtail.images.widgets.ImageChooser",o)}
|
|
1
|
+
(()=>{"use strict";var e,t={1669:e=>{e.exports=jQuery},7199:(e,t,r)=>{var i=r(9465);class a extends i.y{chooserModalClass=ImageChooserModal;initHTMLElements(e){super.initHTMLElements(e),this.previewImage=this.chooserElement.querySelector("[data-chooser-image]")}getStateFromHTML(){const e=super.getStateFromHTML();return e&&(e.preview={url:this.previewImage.getAttribute("src"),width:this.previewImage.getAttribute("width"),height:this.previewImage.getAttribute("height")},e.default_alt_text=this.previewImage.getAttribute("data-default-alt-text")),e}renderState(e){super.renderState(e),this.previewImage.setAttribute("src",e.preview.url),this.previewImage.setAttribute("width",e.preview.width),this.previewImage.setAttribute("data-default-alt-text",e.default_alt_text)}}class o extends i._{widgetClass=a;chooserModalClass=ImageChooserModal}window.telepath.register("wagtail.images.widgets.ImageChooser",o)}},r={};function i(e){var a=r[e];if(void 0!==a)return a.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.m=t,e=[],i.O=(t,r,a,o)=>{if(!r){var s=1/0;for(h=0;h<e.length;h++){for(var[r,a,o]=e[h],l=!0,n=0;n<r.length;n++)(!1&o||s>=o)&&Object.keys(i.O).every(e=>i.O[e](r[n]))?r.splice(n--,1):(l=!1,o<s&&(s=o));if(l){e.splice(h--,1);var u=a();void 0!==u&&(t=u)}}return t}o=o||0;for(var h=e.length;h>0&&e[h-1][2]>o;h--)e[h]=e[h-1];e[h]=[r,a,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=246,(()=>{var e={246:0};i.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,[s,l,n]=r,u=0;if(s.some(t=>0!==e[t])){for(a in l)i.o(l,a)&&(i.m[a]=l[a]);if(n)var h=n(i)}for(t&&t(r);u<s.length;u++)o=s[u],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(h)},r=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=i.O(void 0,[321],()=>i(7199));a=i.O(a)})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t={4023:(e,t,r)=>{var i=r(9465);class a extends i.y{chooserModalClass=ImageChooserModal;initHTMLElements(e){super.initHTMLElements(e),this.previewImage=this.chooserElement.querySelector("[data-chooser-image]")}getStateFromHTML(){const e=super.getStateFromHTML();return e&&(e.preview={url:this.previewImage.getAttribute("src"),width:this.previewImage.getAttribute("width"),height:this.previewImage.getAttribute("height")},e.default_alt_text=this.previewImage.getAttribute("data-default-alt-text")),e}renderState(e){super.renderState(e),this.previewImage.setAttribute("src",e.preview.url),this.previewImage.setAttribute("width",e.preview.width),this.previewImage.setAttribute("data-default-alt-text",e.default_alt_text)}}window.ImageChooser=a}
|
|
1
|
+
(()=>{"use strict";var e,t={1669:e=>{e.exports=jQuery},4023:(e,t,r)=>{var i=r(9465);class a extends i.y{chooserModalClass=ImageChooserModal;initHTMLElements(e){super.initHTMLElements(e),this.previewImage=this.chooserElement.querySelector("[data-chooser-image]")}getStateFromHTML(){const e=super.getStateFromHTML();return e&&(e.preview={url:this.previewImage.getAttribute("src"),width:this.previewImage.getAttribute("width"),height:this.previewImage.getAttribute("height")},e.default_alt_text=this.previewImage.getAttribute("data-default-alt-text")),e}renderState(e){super.renderState(e),this.previewImage.setAttribute("src",e.preview.url),this.previewImage.setAttribute("width",e.preview.width),this.previewImage.setAttribute("data-default-alt-text",e.default_alt_text)}}window.ImageChooser=a}},r={};function i(e){var a=r[e];if(void 0!==a)return a.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.m=t,e=[],i.O=(t,r,a,o)=>{if(!r){var n=1/0;for(h=0;h<e.length;h++){for(var[r,a,o]=e[h],s=!0,l=0;l<r.length;l++)(!1&o||n>=o)&&Object.keys(i.O).every(e=>i.O[e](r[l]))?r.splice(l--,1):(s=!1,o<n&&(n=o));if(s){e.splice(h--,1);var u=a();void 0!==u&&(t=u)}}return t}o=o||0;for(var h=e.length;h>0&&e[h-1][2]>o;h--)e[h]=e[h-1];e[h]=[r,a,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=306,(()=>{var e={306:0};i.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,[n,s,l]=r,u=0;if(n.some(t=>0!==e[t])){for(a in s)i.o(s,a)&&(i.m[a]=s[a]);if(l)var h=l(i)}for(t&&t(r);u<n.length;u++)o=n[u],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(h)},r=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a=i.O(void 0,[321],()=>i(4023));a=i.O(a)})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
$(
|
|
1
|
+
$(function(){$("[data-generator-url]").each(function(){var i=$(this),e=i.find("form"),n=e.find("select#id_filter_method"),a=e.find("input#id_width"),l=e.find("input#id_height"),r=e.find("input#id_closeness"),t=i.find("#result-url"),d=i.find(".loading-mask"),o=i.find("img.preview"),f=i.data("generatorUrl");function s(){var i=n.val();d.addClass("loading"),"width"===i?i+="-"+a.val():"height"===i?i+="-"+l.val():"min"!==i&&"max"!==i&&"fill"!==i||(i+="fill"===i?"-"+a.val()+"x"+l.val()+"-c"+r.val():"-"+a.val()+"x"+l.val()),$.getJSON(f.replace("__filterspec__",i)).done(function(i){t.val(i.url),o.attr("src",i.preview_url),d.removeClass("loading")}).fail(function(i){t.val(i.responseJSON.error),o.attr("src",""),d.removeClass("loading")})}e.on("change",$.debounce(500,s)),e.on("keyup",$.debounce(500,s)),s()})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){e.Jcrop=function(t,n){function o(e){return Math.round(e)+"px"}function r(e){return M.baseClass+"-"+e}function a(){return e.fx.step.hasOwnProperty("backgroundColor")}function i(t){var n=e(t).offset();return[n.left,n.top]}function s(e){return[e.pageX-z[0],e.pageY-z[1]]}function c(t){"object"!=typeof t&&(t={}),M=e.extend(M,t),e.each(["onChange","onSelect","onRelease","onDblClick"],(function(e,t){"function"!=typeof M[t]&&(M[t]=function(){})}))}function u(e,t,n){if(z=i(P),re.setCursor("move"===e?e:e+"-resize"),"move"===e)return re.activateHandlers(function(e){var t=e;return ae.watchKeys(),function(e){te.moveOffset([e[0]-t[0],e[1]-t[1]]),t=e,oe.update()}}(t),g,n);var o=te.getFixed(),r=l(e),a=te.getCorner(l(r));te.setPressed(te.getCorner(r)),te.setCurrent(a),re.activateHandlers(d(e,o),g,n)}function d(e,t){return function(n){if(M.aspectRatio)switch(e){case"e":case"w":n[1]=t.y+1;break;case"n":case"s":n[0]=t.x+1}else switch(e){case"e":case"w":n[1]=t.y2;break;case"n":case"s":n[0]=t.x2}te.setCurrent(n),oe.update()}}function l(e){switch(e){case"n":case"ne":return"sw";case"s":case"e":case"se":return"nw";case"w":case"sw":return"ne";case"nw":return"se"}}function h(e){return function(t){return!(M.disabled||"move"===e&&!M.allowMove||(z=i(P),V=!0,u(e,s(t)),t.stopPropagation(),t.preventDefault(),1))}}function f(e,t,n){var o=e.width(),r=e.height();o>t&&t>0&&(o=t,r=t/e.width()*e.height()),r>n&&n>0&&(r=n,o=n/e.height()*e.width()),G=e.width()/o,N=e.height()/r,e.width(o).height(r)}function p(e){return{x:e.x*G,y:e.y*N,x2:e.x2*G,y2:e.y2*N,w:e.w*G,h:e.h*N}}function g(e){var t=te.getFixed();t.w>M.minSelect[0]&&t.h>M.minSelect[1]?(oe.enableHandles(),oe.done()):oe.release(),re.setCursor(M.allowSelect?"crosshair":"default")}function b(e){if(M.disabled)return!1;if(!M.allowSelect)return!1;V=!0,z=i(P),oe.disableHandles(),re.setCursor("crosshair");var t=s(e);return te.setPressed(t),oe.update(),re.activateHandlers(w,g,"touch"===e.type.substring(0,5)),ae.watchKeys(),e.stopPropagation(),e.preventDefault(),!1}function w(e){te.setCurrent(e),oe.update()}function v(){var t=e("<div></div>").addClass(r("tracker"));return j&&t.css({opacity:0,backgroundColor:"white"}),t}function y(e){m([e[0]/G,e[1]/N,e[2]/G,e[3]/N]),M.onSelect.call(ie,p(te.getFixed())),oe.enableHandles()}function m(e){te.setPressed([e[0],e[1]]),te.setCurrent([e[2],e[3]]),oe.update()}function C(){M.disabled=!0,oe.disableHandles(),oe.setCursor("default"),re.setCursor("default")}function x(){M.disabled=!1,k()}function S(e,t,n){var o=t||M.bgColor;M.bgFade&&a()&&M.fadeTime&&!n?e.animate({backgroundColor:o},{queue:!1,duration:M.fadeTime}):e.css("backgroundColor",o)}function k(e){M.allowResize?e?oe.enableOnly():oe.enableHandles():oe.disableHandles(),re.setCursor(M.allowSelect?"crosshair":"default"),oe.setCursor(M.allowMove?"move":"default"),M.hasOwnProperty("trueSize")&&(G=M.trueSize[0]/J,N=M.trueSize[1]/A),M.hasOwnProperty("setSelect")&&(y(M.setSelect),oe.done(),delete M.setSelect),ne.refresh(),M.bgColor!=$&&(S(M.shade?ne.getShades():R,M.shade&&M.shadeColor||M.bgColor),$=M.bgColor),_!=M.bgOpacity&&(_=M.bgOpacity,M.shade?ne.refresh():oe.setBgOpacity(_)),Y=M.maxSize[0]||0,q=M.maxSize[1]||0,L=M.minSize[0]||0,X=M.minSize[1]||0,M.hasOwnProperty("outerImage")&&(P.attr("src",M.outerImage),delete M.outerImage),oe.refresh()}var z,M=e.extend({},e.Jcrop.defaults),O=navigator.userAgent.toLowerCase(),j=/msie/.test(O),F=/msie [1-6]\./.test(O);"object"!=typeof t&&(t=e(t)[0]),"object"!=typeof n&&(n={}),c(n);var H={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},D=e(t),I=!0;if("IMG"==t.tagName){if(0!=D[0].width&&0!=D[0].height)D.width(D[0].width),D.height(D[0].height);else{var B=new Image;B.src=D[0].src,D.width(B.width),D.height(B.height)}var P=D.clone().removeAttr("id").css(H).show();P.width(D.width()),P.height(D.height()),D.after(P).hide()}else P=D.css(H).show(),I=!1,null===M.shade&&(M.shade=!0);f(P,M.boxWidth,M.boxHeight);var J=P.width(),A=P.height(),R=e("<div />").width(J).height(A).addClass(r("holder")).css({position:"relative",backgroundColor:M.bgColor}).insertAfter(D).append(P);M.addClass&&R.addClass(M.addClass);var T=e("<div />"),K=e("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),E=e("<div />").width("100%").height("100%").css("zIndex",320),W=e("<div />").css({position:"absolute",zIndex:600}).on("dblclick",(function(){var e=te.getFixed();M.onDblClick.call(ie,e)})).insertBefore(P).append(K,E);I&&(T=e("<img />").attr("src",P.attr("src")).css(H).width(J).height(A),K.append(T)),F&&W.css({overflowY:"hidden"});var Y,q,L,X,G,N,V,Q,U=M.boundary,Z=v().width(J+2*U).height(A+2*U).css({position:"absolute",top:o(-U),left:o(-U),zIndex:290}).on("mousedown",b),$=M.bgColor,_=M.bgOpacity;z=i(P);var ee=function(){function e(){var e,t={},n=["touchstart","touchmove","touchend"],o=document.createElement("div");try{for(e=0;e<n.length;e++){var r=n[e],a=(r="on"+r)in o;a||(o.setAttribute(r,"return;"),a="function"==typeof o[r]),t[n[e]]=a}return t.touchstart&&t.touchend&&t.touchmove}catch(e){return!1}}return{createDragger:function(e){return function(t){return!(M.disabled||"move"===e&&!M.allowMove||(z=i(P),V=!0,u(e,s(ee.cfilter(t)),!0),t.stopPropagation(),t.preventDefault(),1))}},newSelection:function(e){return b(ee.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:e,support:!0===M.touchSupport||!1===M.touchSupport?M.touchSupport:e()}}(),te=function(){function e(){if(!M.aspectRatio)return function(){var e,t=c-i,r=u-s;return Y&&Math.abs(t)>Y&&(c=t>0?i+Y:i-Y),q&&Math.abs(r)>q&&(u=r>0?s+q:s-q),X/N&&Math.abs(r)<X/N&&(u=r>0?s+X/N:s-X/N),L/G&&Math.abs(t)<L/G&&(c=t>0?i+L/G:i-L/G),i<0&&(c-=i,i-=i),s<0&&(u-=s,s-=s),c<0&&(i-=c,c-=c),u<0&&(s-=u,u-=u),c>J&&(i-=e=c-J,c-=e),u>A&&(s-=e=u-A,u-=e),i>J&&(u-=e=i-A,s-=e),s>A&&(u-=e=s-A,s-=e),o(n(i,s,c,u))}();var e,t,r,a,d=M.aspectRatio,l=M.minSize[0]/G,h=M.maxSize[0]/G,f=M.maxSize[1]/N,p=c-i,g=u-s,b=Math.abs(p),w=Math.abs(g);return 0===h&&(h=10*J),0===f&&(f=10*A),b/w<d?(t=u,r=w*d,(e=p<0?i-r:r+i)<0?(e=0,a=Math.abs((e-i)/d),t=g<0?s-a:a+s):e>J&&(e=J,a=Math.abs((e-i)/d),t=g<0?s-a:a+s)):(e=c,a=b/d,(t=g<0?s-a:s+a)<0?(t=0,r=Math.abs((t-s)*d),e=p<0?i-r:r+i):t>A&&(t=A,r=Math.abs(t-s)*d,e=p<0?i-r:r+i)),e>i?(e-i<l?e=i+l:e-i>h&&(e=i+h),t=t>s?s+(e-i)/d:s-(e-i)/d):e<i&&(i-e<l?e=i-l:i-e>h&&(e=i-h),t=t>s?s+(i-e)/d:s-(i-e)/d),e<0?(i-=e,e=0):e>J&&(i-=e-J,e=J),t<0?(s-=t,t=0):t>A&&(s-=t-A,t=A),o(n(i,s,e,t))}function t(e){return e[0]<0&&(e[0]=0),e[1]<0&&(e[1]=0),e[0]>J&&(e[0]=J),e[1]>A&&(e[1]=A),[Math.round(e[0]),Math.round(e[1])]}function n(e,t,n,o){var r=e,a=n,i=t,s=o;return n<e&&(r=n,a=e),o<t&&(i=o,s=t),[r,i,a,s]}function o(e){return{x:e[0],y:e[1],x2:e[2],y2:e[3],w:e[2]-e[0],h:e[3]-e[1]}}var r,a,i=0,s=0,c=0,u=0;return{flipCoords:n,setPressed:function(e){e=t(e),c=i=e[0],u=s=e[1]},setCurrent:function(e){e=t(e),r=e[0]-c,a=e[1]-u,c=e[0],u=e[1]},getOffset:function(){return[r,a]},moveOffset:function(e){var t=e[0],n=e[1];0>i+t&&(t-=t+i),0>s+n&&(n-=n+s),A<u+n&&(n+=A-(u+n)),J<c+t&&(t+=J-(c+t)),i+=t,c+=t,s+=n,u+=n},getCorner:function(t){var n=e();switch(t){case"ne":return[n.x2,n.y];case"nw":return[n.x,n.y];case"se":return[n.x2,n.y2];case"sw":return[n.x,n.y2]}},getFixed:e}}(),ne=function(){function t(){return n(te.getFixed())}function n(e){h.top.css({left:o(e.x),width:o(e.w),height:o(e.y)}),h.bottom.css({top:o(e.y2),left:o(e.x),width:o(e.w),height:o(A-e.y2)}),h.right.css({left:o(e.x2),width:o(J-e.x2)}),h.left.css({width:o(e.x)})}function r(){return e("<div />").css({position:"absolute",backgroundColor:M.shadeColor||M.bgColor}).appendTo(l)}function a(){d||(d=!0,l.insertBefore(P),t(),oe.setBgOpacity(1,0,1),T.hide(),i(M.shadeColor||M.bgColor,1),oe.isAwake()?c(M.bgOpacity,1):c(1,1))}function i(e,t){S(u(),e,t)}function s(){d&&(l.remove(),T.show(),d=!1,oe.isAwake()?oe.setBgOpacity(M.bgOpacity,1,1):(oe.setBgOpacity(1,1,1),oe.disableHandles()),S(R,0,1))}function c(e,t){d&&(M.bgFade&&!t?l.animate({opacity:1-e},{queue:!1,duration:M.fadeTime}):l.css({opacity:1-e}))}function u(){return l.children()}var d=!1,l=e("<div />").css({position:"absolute",zIndex:240,opacity:0}),h={top:r(),left:r().height(A),right:r().height(A),bottom:r()};return{update:t,updateRaw:n,getShades:u,setBgColor:i,enable:a,disable:s,resize:function(e,t){h.left.css({height:o(t)}),h.right.css({height:o(t)})},refresh:function(){M.shade?a():s(),oe.isAwake()&&c(M.bgOpacity)},opacity:c}}(),oe=function(){function t(t){var n=e("<div />").css({position:"absolute",opacity:M.borderOpacity}).addClass(r(t));return K.append(n),n}function n(t,n){var o=e("<div />").on("mousedown",h(t)).css({cursor:t+"-resize",position:"absolute",zIndex:n}).addClass("ord-"+t);return ee.support&&o.on("touchstart.jcrop",ee.createDragger(t)),E.append(o),o}function a(e){var t=M.handleSize,o=n(e,w++).css({opacity:M.handleOpacity}).addClass(r("handle"));return t&&o.width(t).height(t),o}function i(e){return n(e,w++).addClass("jcrop-dragbar")}function s(){var e=te.getFixed();te.setPressed([e.x,e.y]),te.setCurrent([e.x2,e.y2]),c()}function c(e){if(b)return u(e)}function u(e){var t=te.getFixed();(function(e,t){W.width(Math.round(e)).height(Math.round(t))})(t.w,t.h),function(e,t){M.shade||T.css({top:o(-t),left:o(-e)}),W.css({top:o(t),left:o(e)})}(t.x,t.y),M.shade&&ne.updateRaw(t),b||(W.show(),M.shade?ne.opacity(_):d(_,!0),b=!0),e?M.onSelect.call(ie,p(t)):M.onChange.call(ie,p(t))}function d(e,t,n){(b||t)&&(M.bgFade&&!n?P.animate({opacity:e},{queue:!1,duration:M.fadeTime}):P.css("opacity",e))}function l(){if(x=!0,M.allowResize)return E.show(),!0}function f(){x=!1,E.hide()}function g(e){e?(Q=!0,f()):(Q=!1,l())}var b,w=370,y={},m={},C={},x=!1;M.dragEdges&&e.isArray(M.createDragbars)&&function(e){var t;for(t=0;t<e.length;t++)C[e[t]]=i(e[t])}(M.createDragbars),e.isArray(M.createHandles)&&function(e){var t;for(t=0;t<e.length;t++)m[e[t]]=a(e[t])}(M.createHandles),M.drawBorders&&e.isArray(M.createBorders)&&function(e){var n,o;for(o=0;o<e.length;o++){switch(e[o]){case"n":n="hline";break;case"s":n="hline bottom";break;case"e":n="vline right";break;case"w":n="vline"}y[e[o]]=t(n)}}(M.createBorders),e(document).on("touchstart.jcrop-ios",(function(t){e(t.currentTarget).hasClass("jcrop-tracker")&&t.stopPropagation()}));var S=v().on("mousedown",h("move")).css({cursor:"move",position:"absolute",zIndex:360});return ee.support&&S.on("touchstart.jcrop",ee.createDragger("move")),K.append(S),f(),{updateVisible:c,update:u,release:function(){f(),W.hide(),M.shade?ne.opacity(1):d(1),b=!1,M.onRelease.call(ie)},refresh:s,isAwake:function(){return b},setCursor:function(e){S.css("cursor",e)},enableHandles:l,enableOnly:function(){x=!0},showHandles:function(){x&&E.show()},disableHandles:f,animMode:g,setBgOpacity:d,done:function(){g(!1),s()}}}(),re=function(){function t(t){Z.css({zIndex:450}),t?e(document).on("touchmove.jcrop",a).on("touchend.jcrop",i):d&&e(document).on("mousemove.jcrop",o).on("mouseup.jcrop",r)}function n(){Z.css({zIndex:290}),e(document).off(".jcrop")}function o(e){return c(s(e)),!1}function r(e){return e.preventDefault(),e.stopPropagation(),V&&(V=!1,u(s(e)),oe.isAwake()&&M.onSelect.call(ie,p(te.getFixed())),n(),c=function(){},u=function(){}),!1}function a(e){return c(s(ee.cfilter(e))),!1}function i(e){return r(ee.cfilter(e))}var c=function(){},u=function(){},d=M.trackDocument;return d||Z.mousemove(o).mouseup(r).mouseout(r),P.before(Z),{activateHandlers:function(e,n,o){return V=!0,c=e,u=n,t(o),!1},setCursor:function(e){Z.css("cursor",e)}}}(),ae=function(){function t(e,t,n){M.allowMove&&(te.moveOffset([t,n]),oe.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}var n=e('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),o=e("<div />").css({position:"absolute",overflow:"hidden"}).append(n);return M.keySupport&&(n.on("keydown",(function(e){if(e.ctrlKey||e.metaKey)return!0;var n=e.shiftKey?10:1;switch(e.keyCode){case 37:t(e,-n,0);break;case 39:t(e,n,0);break;case 38:t(e,0,-n);break;case 40:t(e,0,n);break;case 27:M.allowSelect&&oe.release();break;case 9:return!0}return!1})).on("blur",(function(e){n.hide()})),F||!M.fixedSupport?(n.css({position:"absolute",left:"-20px"}),o.append(n).insertBefore(P)):n.insertBefore(P)),{watchKeys:function(){M.keySupport&&(n.show(),n.trigger("focus"))}}}();ee.support&&Z.on("touchstart.jcrop",ee.newSelection),E.hide(),k(!0);var ie={setImage:function(e,t){oe.release(),C();var n=new Image;n.onload=function(){var o=n.width,r=n.height,a=M.boxWidth,i=M.boxHeight;P.width(o).height(r),P.attr("src",e),T.attr("src",e),f(P,a,i),J=P.width(),A=P.height(),T.width(J).height(A),Z.width(J+2*U).height(A+2*U),R.width(J).height(A),ne.resize(J,A),x(),"function"==typeof t&&t.call(ie)},n.src=e},animateTo:function(e,t){function n(){window.setTimeout(v,l)}var o=e[0]/G,r=e[1]/N,a=e[2]/G,i=e[3]/N;if(!Q){var s=te.flipCoords(o,r,a,i),c=te.getFixed(),u=[c.x,c.y,c.x2,c.y2],d=u,l=M.animationDelay,h=s[0]-u[0],f=s[1]-u[1],p=s[2]-u[2],g=s[3]-u[3],b=0,w=M.swingSpeed;o=d[0],r=d[1],a=d[2],i=d[3],oe.animMode(!0);var v=function(){b+=(100-b)/w,d[0]=Math.round(o+b/100*h),d[1]=Math.round(r+b/100*f),d[2]=Math.round(a+b/100*p),d[3]=Math.round(i+b/100*g),b>=99.8&&(b=100),b<100?(m(d),n()):(oe.done(),oe.animMode(!1),"function"==typeof t&&t.call(ie))};n()}},setSelect:y,setOptions:function(e){c(e),k()},tellSelect:function(){return p(te.getFixed())},tellScaled:function(){return te.getFixed()},setClass:function(e){R.removeClass().addClass(r("holder")).addClass(e)},disable:C,enable:x,cancel:function(){oe.done(),re.activateHandlers(null,null)},release:oe.release,destroy:function(){R.remove(),D.show(),D.css("visibility","visible"),e(t).removeData("Jcrop")},focus:ae.watchKeys,getBounds:function(){return[J*G,A*N]},getWidgetSize:function(){return[J,A]},getScaleFactor:function(){return[G,N]},getOptions:function(){return M},ui:{holder:R,selection:W}};return j&&R.on("selectstart",(function(){return!1})),D.data("Jcrop",ie),ie},e.fn.Jcrop=function(t,n){var o;return this.each((function(){if(e(this).data("Jcrop")){if("api"===t)return e(this).data("Jcrop");e(this).data("Jcrop").setOptions(t)}else"IMG"==this.tagName?e.Jcrop.Loader(this,(function(){e(this).css({display:"block",visibility:"hidden"}),o=e.Jcrop(this,t),e.isFunction(n)&&n.call(o)})):(e(this).css({display:"block",visibility:"hidden"}),o=e.Jcrop(this,t),e.isFunction(n)&&n.call(o))})),this},e.Jcrop.Loader=function(t,n,o){var r=e(t),a=r[0];r.on("load.jcloader",(function t(){a.complete?(r.off(".jcloader"),e.isFunction(n)&&n.call(a)):window.setTimeout(t,50)})).on("error.jcloader",(function(t){r.off(".jcloader"),e.isFunction(o)&&o.call(a)})),a.complete&&e.isFunction(n)&&(r.off(".jcloader"),n.call(a))},e.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery);
|
|
1
|
+
!function(e){e.Jcrop=function(t,n){function o(e){return Math.round(e)+"px"}function r(e){return M.baseClass+"-"+e}function a(){return e.fx.step.hasOwnProperty("backgroundColor")}function i(t){var n=e(t).offset();return[n.left,n.top]}function s(e){return[e.pageX-z[0],e.pageY-z[1]]}function c(t){"object"!=typeof t&&(t={}),M=e.extend(M,t),e.each(["onChange","onSelect","onRelease","onDblClick"],function(e,t){"function"!=typeof M[t]&&(M[t]=function(){})})}function u(e,t,n){if(z=i(P),re.setCursor("move"===e?e:e+"-resize"),"move"===e)return re.activateHandlers(function(e){var t=e;return ae.watchKeys(),function(e){te.moveOffset([e[0]-t[0],e[1]-t[1]]),t=e,oe.update()}}(t),g,n);var o=te.getFixed(),r=l(e),a=te.getCorner(l(r));te.setPressed(te.getCorner(r)),te.setCurrent(a),re.activateHandlers(d(e,o),g,n)}function d(e,t){return function(n){if(M.aspectRatio)switch(e){case"e":case"w":n[1]=t.y+1;break;case"n":case"s":n[0]=t.x+1}else switch(e){case"e":case"w":n[1]=t.y2;break;case"n":case"s":n[0]=t.x2}te.setCurrent(n),oe.update()}}function l(e){switch(e){case"n":case"ne":return"sw";case"s":case"e":case"se":return"nw";case"w":case"sw":return"ne";case"nw":return"se"}}function h(e){return function(t){return!(M.disabled||"move"===e&&!M.allowMove||(z=i(P),V=!0,u(e,s(t)),t.stopPropagation(),t.preventDefault(),1))}}function f(e,t,n){var o=e.width(),r=e.height();o>t&&t>0&&(o=t,r=t/e.width()*e.height()),r>n&&n>0&&(r=n,o=n/e.height()*e.width()),G=e.width()/o,N=e.height()/r,e.width(o).height(r)}function p(e){return{x:e.x*G,y:e.y*N,x2:e.x2*G,y2:e.y2*N,w:e.w*G,h:e.h*N}}function g(e){var t=te.getFixed();t.w>M.minSelect[0]&&t.h>M.minSelect[1]?(oe.enableHandles(),oe.done()):oe.release(),re.setCursor(M.allowSelect?"crosshair":"default")}function b(e){if(M.disabled)return!1;if(!M.allowSelect)return!1;V=!0,z=i(P),oe.disableHandles(),re.setCursor("crosshair");var t=s(e);return te.setPressed(t),oe.update(),re.activateHandlers(w,g,"touch"===e.type.substring(0,5)),ae.watchKeys(),e.stopPropagation(),e.preventDefault(),!1}function w(e){te.setCurrent(e),oe.update()}function v(){var t=e("<div></div>").addClass(r("tracker"));return j&&t.css({opacity:0,backgroundColor:"white"}),t}function y(e){m([e[0]/G,e[1]/N,e[2]/G,e[3]/N]),M.onSelect.call(ie,p(te.getFixed())),oe.enableHandles()}function m(e){te.setPressed([e[0],e[1]]),te.setCurrent([e[2],e[3]]),oe.update()}function C(){M.disabled=!0,oe.disableHandles(),oe.setCursor("default"),re.setCursor("default")}function x(){M.disabled=!1,k()}function S(e,t,n){var o=t||M.bgColor;M.bgFade&&a()&&M.fadeTime&&!n?e.animate({backgroundColor:o},{queue:!1,duration:M.fadeTime}):e.css("backgroundColor",o)}function k(e){M.allowResize?e?oe.enableOnly():oe.enableHandles():oe.disableHandles(),re.setCursor(M.allowSelect?"crosshair":"default"),oe.setCursor(M.allowMove?"move":"default"),M.hasOwnProperty("trueSize")&&(G=M.trueSize[0]/J,N=M.trueSize[1]/A),M.hasOwnProperty("setSelect")&&(y(M.setSelect),oe.done(),delete M.setSelect),ne.refresh(),M.bgColor!=$&&(S(M.shade?ne.getShades():R,M.shade&&M.shadeColor||M.bgColor),$=M.bgColor),_!=M.bgOpacity&&(_=M.bgOpacity,M.shade?ne.refresh():oe.setBgOpacity(_)),Y=M.maxSize[0]||0,q=M.maxSize[1]||0,L=M.minSize[0]||0,X=M.minSize[1]||0,M.hasOwnProperty("outerImage")&&(P.attr("src",M.outerImage),delete M.outerImage),oe.refresh()}var z,M=e.extend({},e.Jcrop.defaults),O=navigator.userAgent.toLowerCase(),j=/msie/.test(O),F=/msie [1-6]\./.test(O);"object"!=typeof t&&(t=e(t)[0]),"object"!=typeof n&&(n={}),c(n);var H={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},D=e(t),I=!0;if("IMG"==t.tagName){if(0!=D[0].width&&0!=D[0].height)D.width(D[0].width),D.height(D[0].height);else{var B=new Image;B.src=D[0].src,D.width(B.width),D.height(B.height)}var P=D.clone().removeAttr("id").css(H).show();P.width(D.width()),P.height(D.height()),D.after(P).hide()}else P=D.css(H).show(),I=!1,null===M.shade&&(M.shade=!0);f(P,M.boxWidth,M.boxHeight);var J=P.width(),A=P.height(),R=e("<div />").width(J).height(A).addClass(r("holder")).css({position:"relative",backgroundColor:M.bgColor}).insertAfter(D).append(P);M.addClass&&R.addClass(M.addClass);var T=e("<div />"),K=e("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),E=e("<div />").width("100%").height("100%").css("zIndex",320),W=e("<div />").css({position:"absolute",zIndex:600}).on("dblclick",function(){var e=te.getFixed();M.onDblClick.call(ie,e)}).insertBefore(P).append(K,E);I&&(T=e("<img />").attr("src",P.attr("src")).css(H).width(J).height(A),K.append(T)),F&&W.css({overflowY:"hidden"});var Y,q,L,X,G,N,V,Q,U=M.boundary,Z=v().width(J+2*U).height(A+2*U).css({position:"absolute",top:o(-U),left:o(-U),zIndex:290}).on("mousedown",b),$=M.bgColor,_=M.bgOpacity;z=i(P);var ee=function(){function e(){var e,t={},n=["touchstart","touchmove","touchend"],o=document.createElement("div");try{for(e=0;e<n.length;e++){var r=n[e],a=(r="on"+r)in o;a||(o.setAttribute(r,"return;"),a="function"==typeof o[r]),t[n[e]]=a}return t.touchstart&&t.touchend&&t.touchmove}catch(e){return!1}}return{createDragger:function(e){return function(t){return!(M.disabled||"move"===e&&!M.allowMove||(z=i(P),V=!0,u(e,s(ee.cfilter(t)),!0),t.stopPropagation(),t.preventDefault(),1))}},newSelection:function(e){return b(ee.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:e,support:!0===M.touchSupport||!1===M.touchSupport?M.touchSupport:e()}}(),te=function(){function e(){if(!M.aspectRatio)return function(){var e,t=c-i,r=u-s;return Y&&Math.abs(t)>Y&&(c=t>0?i+Y:i-Y),q&&Math.abs(r)>q&&(u=r>0?s+q:s-q),X/N&&Math.abs(r)<X/N&&(u=r>0?s+X/N:s-X/N),L/G&&Math.abs(t)<L/G&&(c=t>0?i+L/G:i-L/G),i<0&&(c-=i,i-=i),s<0&&(u-=s,s-=s),c<0&&(i-=c,c-=c),u<0&&(s-=u,u-=u),c>J&&(i-=e=c-J,c-=e),u>A&&(s-=e=u-A,u-=e),i>J&&(u-=e=i-A,s-=e),s>A&&(u-=e=s-A,s-=e),o(n(i,s,c,u))}();var e,t,r,a,d=M.aspectRatio,l=M.minSize[0]/G,h=M.maxSize[0]/G,f=M.maxSize[1]/N,p=c-i,g=u-s,b=Math.abs(p),w=Math.abs(g);return 0===h&&(h=10*J),0===f&&(f=10*A),b/w<d?(t=u,r=w*d,(e=p<0?i-r:r+i)<0?(e=0,a=Math.abs((e-i)/d),t=g<0?s-a:a+s):e>J&&(e=J,a=Math.abs((e-i)/d),t=g<0?s-a:a+s)):(e=c,a=b/d,(t=g<0?s-a:s+a)<0?(t=0,r=Math.abs((t-s)*d),e=p<0?i-r:r+i):t>A&&(t=A,r=Math.abs(t-s)*d,e=p<0?i-r:r+i)),e>i?(e-i<l?e=i+l:e-i>h&&(e=i+h),t=t>s?s+(e-i)/d:s-(e-i)/d):e<i&&(i-e<l?e=i-l:i-e>h&&(e=i-h),t=t>s?s+(i-e)/d:s-(i-e)/d),e<0?(i-=e,e=0):e>J&&(i-=e-J,e=J),t<0?(s-=t,t=0):t>A&&(s-=t-A,t=A),o(n(i,s,e,t))}function t(e){return e[0]<0&&(e[0]=0),e[1]<0&&(e[1]=0),e[0]>J&&(e[0]=J),e[1]>A&&(e[1]=A),[Math.round(e[0]),Math.round(e[1])]}function n(e,t,n,o){var r=e,a=n,i=t,s=o;return n<e&&(r=n,a=e),o<t&&(i=o,s=t),[r,i,a,s]}function o(e){return{x:e[0],y:e[1],x2:e[2],y2:e[3],w:e[2]-e[0],h:e[3]-e[1]}}var r,a,i=0,s=0,c=0,u=0;return{flipCoords:n,setPressed:function(e){e=t(e),c=i=e[0],u=s=e[1]},setCurrent:function(e){e=t(e),r=e[0]-c,a=e[1]-u,c=e[0],u=e[1]},getOffset:function(){return[r,a]},moveOffset:function(e){var t=e[0],n=e[1];0>i+t&&(t-=t+i),0>s+n&&(n-=n+s),A<u+n&&(n+=A-(u+n)),J<c+t&&(t+=J-(c+t)),i+=t,c+=t,s+=n,u+=n},getCorner:function(t){var n=e();switch(t){case"ne":return[n.x2,n.y];case"nw":return[n.x,n.y];case"se":return[n.x2,n.y2];case"sw":return[n.x,n.y2]}},getFixed:e}}(),ne=function(){function t(){return n(te.getFixed())}function n(e){h.top.css({left:o(e.x),width:o(e.w),height:o(e.y)}),h.bottom.css({top:o(e.y2),left:o(e.x),width:o(e.w),height:o(A-e.y2)}),h.right.css({left:o(e.x2),width:o(J-e.x2)}),h.left.css({width:o(e.x)})}function r(){return e("<div />").css({position:"absolute",backgroundColor:M.shadeColor||M.bgColor}).appendTo(l)}function a(){d||(d=!0,l.insertBefore(P),t(),oe.setBgOpacity(1,0,1),T.hide(),i(M.shadeColor||M.bgColor,1),oe.isAwake()?c(M.bgOpacity,1):c(1,1))}function i(e,t){S(u(),e,t)}function s(){d&&(l.remove(),T.show(),d=!1,oe.isAwake()?oe.setBgOpacity(M.bgOpacity,1,1):(oe.setBgOpacity(1,1,1),oe.disableHandles()),S(R,0,1))}function c(e,t){d&&(M.bgFade&&!t?l.animate({opacity:1-e},{queue:!1,duration:M.fadeTime}):l.css({opacity:1-e}))}function u(){return l.children()}var d=!1,l=e("<div />").css({position:"absolute",zIndex:240,opacity:0}),h={top:r(),left:r().height(A),right:r().height(A),bottom:r()};return{update:t,updateRaw:n,getShades:u,setBgColor:i,enable:a,disable:s,resize:function(e,t){h.left.css({height:o(t)}),h.right.css({height:o(t)})},refresh:function(){M.shade?a():s(),oe.isAwake()&&c(M.bgOpacity)},opacity:c}}(),oe=function(){function t(t){var n=e("<div />").css({position:"absolute",opacity:M.borderOpacity}).addClass(r(t));return K.append(n),n}function n(t,n){var o=e("<div />").on("mousedown",h(t)).css({cursor:t+"-resize",position:"absolute",zIndex:n}).addClass("ord-"+t);return ee.support&&o.on("touchstart.jcrop",ee.createDragger(t)),E.append(o),o}function a(e){var t=M.handleSize,o=n(e,w++).css({opacity:M.handleOpacity}).addClass(r("handle"));return t&&o.width(t).height(t),o}function i(e){return n(e,w++).addClass("jcrop-dragbar")}function s(){var e=te.getFixed();te.setPressed([e.x,e.y]),te.setCurrent([e.x2,e.y2]),c()}function c(e){if(b)return u(e)}function u(e){var t=te.getFixed();(function(e,t){W.width(Math.round(e)).height(Math.round(t))})(t.w,t.h),function(e,t){M.shade||T.css({top:o(-t),left:o(-e)}),W.css({top:o(t),left:o(e)})}(t.x,t.y),M.shade&&ne.updateRaw(t),b||(W.show(),M.shade?ne.opacity(_):d(_,!0),b=!0),e?M.onSelect.call(ie,p(t)):M.onChange.call(ie,p(t))}function d(e,t,n){(b||t)&&(M.bgFade&&!n?P.animate({opacity:e},{queue:!1,duration:M.fadeTime}):P.css("opacity",e))}function l(){if(x=!0,M.allowResize)return E.show(),!0}function f(){x=!1,E.hide()}function g(e){e?(Q=!0,f()):(Q=!1,l())}var b,w=370,y={},m={},C={},x=!1;M.dragEdges&&e.isArray(M.createDragbars)&&function(e){var t;for(t=0;t<e.length;t++)C[e[t]]=i(e[t])}(M.createDragbars),e.isArray(M.createHandles)&&function(e){var t;for(t=0;t<e.length;t++)m[e[t]]=a(e[t])}(M.createHandles),M.drawBorders&&e.isArray(M.createBorders)&&function(e){var n,o;for(o=0;o<e.length;o++){switch(e[o]){case"n":n="hline";break;case"s":n="hline bottom";break;case"e":n="vline right";break;case"w":n="vline"}y[e[o]]=t(n)}}(M.createBorders),e(document).on("touchstart.jcrop-ios",function(t){e(t.currentTarget).hasClass("jcrop-tracker")&&t.stopPropagation()});var S=v().on("mousedown",h("move")).css({cursor:"move",position:"absolute",zIndex:360});return ee.support&&S.on("touchstart.jcrop",ee.createDragger("move")),K.append(S),f(),{updateVisible:c,update:u,release:function(){f(),W.hide(),M.shade?ne.opacity(1):d(1),b=!1,M.onRelease.call(ie)},refresh:s,isAwake:function(){return b},setCursor:function(e){S.css("cursor",e)},enableHandles:l,enableOnly:function(){x=!0},showHandles:function(){x&&E.show()},disableHandles:f,animMode:g,setBgOpacity:d,done:function(){g(!1),s()}}}(),re=function(){function t(t){Z.css({zIndex:450}),t?e(document).on("touchmove.jcrop",a).on("touchend.jcrop",i):d&&e(document).on("mousemove.jcrop",o).on("mouseup.jcrop",r)}function n(){Z.css({zIndex:290}),e(document).off(".jcrop")}function o(e){return c(s(e)),!1}function r(e){return e.preventDefault(),e.stopPropagation(),V&&(V=!1,u(s(e)),oe.isAwake()&&M.onSelect.call(ie,p(te.getFixed())),n(),c=function(){},u=function(){}),!1}function a(e){return c(s(ee.cfilter(e))),!1}function i(e){return r(ee.cfilter(e))}var c=function(){},u=function(){},d=M.trackDocument;return d||Z.mousemove(o).mouseup(r).mouseout(r),P.before(Z),{activateHandlers:function(e,n,o){return V=!0,c=e,u=n,t(o),!1},setCursor:function(e){Z.css("cursor",e)}}}(),ae=function(){function t(e,t,n){M.allowMove&&(te.moveOffset([t,n]),oe.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}var n=e('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),o=e("<div />").css({position:"absolute",overflow:"hidden"}).append(n);return M.keySupport&&(n.on("keydown",function(e){if(e.ctrlKey||e.metaKey)return!0;var n=e.shiftKey?10:1;switch(e.keyCode){case 37:t(e,-n,0);break;case 39:t(e,n,0);break;case 38:t(e,0,-n);break;case 40:t(e,0,n);break;case 27:M.allowSelect&&oe.release();break;case 9:return!0}return!1}).on("blur",function(e){n.hide()}),F||!M.fixedSupport?(n.css({position:"absolute",left:"-20px"}),o.append(n).insertBefore(P)):n.insertBefore(P)),{watchKeys:function(){M.keySupport&&(n.show(),n.trigger("focus"))}}}();ee.support&&Z.on("touchstart.jcrop",ee.newSelection),E.hide(),k(!0);var ie={setImage:function(e,t){oe.release(),C();var n=new Image;n.onload=function(){var o=n.width,r=n.height,a=M.boxWidth,i=M.boxHeight;P.width(o).height(r),P.attr("src",e),T.attr("src",e),f(P,a,i),J=P.width(),A=P.height(),T.width(J).height(A),Z.width(J+2*U).height(A+2*U),R.width(J).height(A),ne.resize(J,A),x(),"function"==typeof t&&t.call(ie)},n.src=e},animateTo:function(e,t){function n(){window.setTimeout(v,l)}var o=e[0]/G,r=e[1]/N,a=e[2]/G,i=e[3]/N;if(!Q){var s=te.flipCoords(o,r,a,i),c=te.getFixed(),u=[c.x,c.y,c.x2,c.y2],d=u,l=M.animationDelay,h=s[0]-u[0],f=s[1]-u[1],p=s[2]-u[2],g=s[3]-u[3],b=0,w=M.swingSpeed;o=d[0],r=d[1],a=d[2],i=d[3],oe.animMode(!0);var v=function(){b+=(100-b)/w,d[0]=Math.round(o+b/100*h),d[1]=Math.round(r+b/100*f),d[2]=Math.round(a+b/100*p),d[3]=Math.round(i+b/100*g),b>=99.8&&(b=100),b<100?(m(d),n()):(oe.done(),oe.animMode(!1),"function"==typeof t&&t.call(ie))};n()}},setSelect:y,setOptions:function(e){c(e),k()},tellSelect:function(){return p(te.getFixed())},tellScaled:function(){return te.getFixed()},setClass:function(e){R.removeClass().addClass(r("holder")).addClass(e)},disable:C,enable:x,cancel:function(){oe.done(),re.activateHandlers(null,null)},release:oe.release,destroy:function(){R.remove(),D.show(),D.css("visibility","visible"),e(t).removeData("Jcrop")},focus:ae.watchKeys,getBounds:function(){return[J*G,A*N]},getWidgetSize:function(){return[J,A]},getScaleFactor:function(){return[G,N]},getOptions:function(){return M},ui:{holder:R,selection:W}};return j&&R.on("selectstart",function(){return!1}),D.data("Jcrop",ie),ie},e.fn.Jcrop=function(t,n){var o;return this.each(function(){if(e(this).data("Jcrop")){if("api"===t)return e(this).data("Jcrop");e(this).data("Jcrop").setOptions(t)}else"IMG"==this.tagName?e.Jcrop.Loader(this,function(){e(this).css({display:"block",visibility:"hidden"}),o=e.Jcrop(this,t),e.isFunction(n)&&n.call(o)}):(e(this).css({display:"block",visibility:"hidden"}),o=e.Jcrop(this,t),e.isFunction(n)&&n.call(o))}),this},e.Jcrop.Loader=function(t,n,o){var r=e(t),a=r[0];r.on("load.jcloader",function t(){a.complete?(r.off(".jcloader"),e.isFunction(n)&&n.call(a)):window.setTimeout(t,50)}).on("error.jcloader",function(t){r.off(".jcloader"),e.isFunction(o)&&o.call(a)}),a.complete&&e.isFunction(n)&&(r.off(".jcloader"),n.call(a))},e.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","load-image","load-image-meta","load-image-exif","load-image-ios","./jquery.fileupload-process"],e):e(window.jQuery,window.loadImage)}(
|
|
1
|
+
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","load-image","load-image-meta","load-image-exif","load-image-ios","./jquery.fileupload-process"],e):e(window.jQuery,window.loadImage)}(function(e,i){"use strict";e.blueimp.fileupload.prototype.options.processQueue.unshift({action:"loadImageMetaData",disableImageHead:"@",disableExif:"@",disableExifThumbnail:"@",disableExifSub:"@",disableExifGps:"@",disabled:"@disableImageMetaDataLoad"},{action:"loadImage",prefix:!0,fileTypes:"@",maxFileSize:"@",noRevoke:"@",disabled:"@disableImageLoad"},{action:"resizeImage",prefix:"image",maxWidth:"@",maxHeight:"@",minWidth:"@",minHeight:"@",crop:"@",orientation:"@",forceResize:"@",disabled:"@disableImageResize"},{action:"saveImage",quality:"@imageQuality",type:"@imageType",disabled:"@disableImageResize"},{action:"saveImageMetaData",disabled:"@disableImageMetaDataSave"},{action:"resizeImage",prefix:"preview",maxWidth:"@",maxHeight:"@",minWidth:"@",minHeight:"@",crop:"@",orientation:"@",thumbnail:"@",canvas:"@",disabled:"@disableImagePreview"},{action:"setImage",name:"@imagePreviewName",disabled:"@disableImagePreview"},{action:"deleteImageReferences",disabled:"@disableImageReferencesDeletion"}),e.widget("blueimp.fileupload",e.blueimp.fileupload,{options:{loadImageFileTypes:/^image\/(gif|jpeg|png|svg\+xml)$/,loadImageMaxFileSize:1e7,imageMaxWidth:1920,imageMaxHeight:1080,imageOrientation:!1,imageCrop:!1,disableImageResize:!0,previewMaxWidth:80,previewMaxHeight:80,previewOrientation:!0,previewThumbnail:!0,previewCrop:!1,previewCanvas:!0},processActions:{loadImage:function(a,t){if(t.disabled)return a;var n=this,s=a.files[a.index],r=e.Deferred();return"number"===e.type(t.maxFileSize)&&s.size>t.maxFileSize||t.fileTypes&&!t.fileTypes.test(s.type)||!i(s,function(e){e.src&&(a.img=e),r.resolveWith(n,[a])},t)?a:r.promise()},resizeImage:function(a,t){if(t.disabled||!a.canvas&&!a.img)return a;t=e.extend({canvas:!0},t);var n,s=this,r=e.Deferred(),d=t.canvas&&a.canvas||a.img,o=function(e){e&&(e.width!==d.width||e.height!==d.height||t.forceResize)&&(a[e.getContext?"canvas":"img"]=e),a.preview=e,r.resolveWith(s,[a])};if(a.exif){if(!0===t.orientation&&(t.orientation=a.exif.get("Orientation")),t.thumbnail&&(n=a.exif.get("Thumbnail")))return i(n,o,t),r.promise();a.orientation?delete t.orientation:a.orientation=t.orientation}return d?(o(i.scale(d,t)),r.promise()):a},saveImage:function(i,a){if(!i.canvas||a.disabled)return i;var t=this,n=i.files[i.index],s=e.Deferred();return i.canvas.toBlob?(i.canvas.toBlob(function(e){e.name||(n.type===e.type?e.name=n.name:n.name&&(e.name=n.name.replace(/\..+$/,"."+e.type.substr(6)))),n.type!==e.type&&delete i.imageHead,i.files[i.index]=e,s.resolveWith(t,[i])},a.type||n.type,a.quality),s.promise()):i},loadImageMetaData:function(a,t){if(t.disabled)return a;var n=this,s=e.Deferred();return i.parseMetaData(a.files[a.index],function(i){e.extend(a,i),s.resolveWith(n,[a])},t),s.promise()},saveImageMetaData:function(e,i){if(!(e.imageHead&&e.canvas&&e.canvas.toBlob)||i.disabled)return e;var a=e.files[e.index],t=new Blob([e.imageHead,this._blobSlice.call(a,20)],{type:a.type});return t.name=a.name,e.files[e.index]=t,e},setImage:function(e,i){return e.preview&&!i.disabled&&(e.files[e.index][i.name||"preview"]=e.preview),e},deleteImageReferences:function(e,i){return i.disabled||(delete e.img,delete e.canvas,delete e.preview,delete e.imageHead),e}}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./jquery.fileupload-process"],e):e(window.jQuery)}(
|
|
1
|
+
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./jquery.fileupload-process"],e):e(window.jQuery)}(function(e){"use strict";e.blueimp.fileupload.prototype.options.processQueue.push({action:"validate",always:!0,acceptFileTypes:"@",maxFileSize:"@",minFileSize:"@",maxNumberOfFiles:"@",disabled:"@disableValidation"}),e.widget("blueimp.fileupload",e.blueimp.fileupload,{options:{getNumberOfFiles:e.noop,messages:{maxNumberOfFiles:"Maximum number of files exceeded",acceptFileTypes:"File type not allowed",maxFileSize:"File is too large",minFileSize:"File is too small"}},processActions:{validate:function(i,l){if(l.disabled)return i;var r,s=e.Deferred(),t=this.options,o=i.files[i.index];return(l.minFileSize||l.maxFileSize)&&(r=o.size),"number"===e.type(l.maxNumberOfFiles)&&(t.getNumberOfFiles()||0)+i.files.length>l.maxNumberOfFiles?o.error=t.i18n("maxNumberOfFiles"):!l.acceptFileTypes||l.acceptFileTypes.test(o.type)||l.acceptFileTypes.test(o.name)?r>l.maxFileSize?o.error=t.i18n("maxFileSize"):"number"===e.type(r)&&r<l.minFileSize?o.error=t.i18n("minFileSize"):delete o.error:o.error=t.i18n("acceptFileTypes"),o.error||i.files.error?(i.files.error=!0,s.rejectWith(this,[i])):s.resolveWith(this,[i]),s.promise()}}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){"use strict";var t=function(e,i,a){var n,r,o=document.createElement("img");if(o.onerror=i,o.onload=function(){!r||a&&a.noRevoke||t.revokeObjectURL(r),i&&i(t.scale(o,a))},t.isInstanceOf("Blob",e)||t.isInstanceOf("File",e))n=r=t.createObjectURL(e),o._type=e.type;else{if("string"!=typeof e)return!1;n=e,a&&a.crossOrigin&&(o.crossOrigin=a.crossOrigin)}return n?(o.src=n,o):t.readFile(e,(function(e){var t=e.target;t&&t.result?o.src=t.result:i&&i(e)}))},i=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;t.isInstanceOf=function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},t.transformCoordinates=function(){},t.getTransformedOptions=function(e){return e},t.renderImageToCanvas=function(e,t,i,a,n,r,o,s,d,l){return e.getContext("2d").drawImage(t,i,a,n,r,o,s,d,l),e},t.hasCanvasOption=function(e){return e.canvas||e.crop},t.scale=function(e,i){i=i||{};var a,n,r,o,s,d,l,c,u,g=document.createElement("canvas"),f=e.getContext||t.hasCanvasOption(i)&&g.getContext,h=e.naturalWidth||e.width,m=e.naturalHeight||e.height,p=h,S=m,b=function(){var e=Math.max((r||p)/p,(o||S)/S);e>1&&(p=Math.ceil(p*e),S=Math.ceil(S*e))},v=function(){var e=Math.min((a||p)/p,(n||S)/S);1>e&&(p=Math.ceil(p*e),S=Math.ceil(S*e))};return f&&(l=(i=t.getTransformedOptions(i)).left||0,c=i.top||0,i.sourceWidth?(s=i.sourceWidth,void 0!==i.right&&void 0===i.left&&(l=h-s-i.right)):s=h-l-(i.right||0),i.sourceHeight?(d=i.sourceHeight,void 0!==i.bottom&&void 0===i.top&&(c=m-d-i.bottom)):d=m-c-(i.bottom||0),p=s,S=d),a=i.maxWidth,n=i.maxHeight,r=i.minWidth,o=i.minHeight,f&&a&&n&&i.crop?(p=a,S=n,0>(u=s/d-a/n)?(d=n*s/a,void 0===i.top&&void 0===i.bottom&&(c=(m-d)/2)):u>0&&(s=a*d/n,void 0===i.left&&void 0===i.right&&(l=(h-s)/2))):((i.contain||i.cover)&&(r=a=a||r,o=n=n||o),i.cover?(v(),b()):(b(),v())),f?(g.width=p,g.height=S,t.transformCoordinates(g,i),t.renderImageToCanvas(g,e,l,c,s,d,0,0,p,S)):(e.width=p,e.height=S,e)},t.createObjectURL=function(e){return!!i&&i.createObjectURL(e)},t.revokeObjectURL=function(e){return!!i&&i.revokeObjectURL(e)},t.readFile=function(e,t,i){if(window.FileReader){var a=new FileReader;if(a.onload=a.onerror=t,a[i=i||"readAsDataURL"])return a[i](e),a}return!1},"function"==typeof define&&define.amd?define((function(){return t})):e.loadImage=t}(this),function(e){"use strict";"function"==typeof define&&define.amd?define(["load-image"],e):e(window.loadImage)}((function(e){"use strict";if(window.navigator&&window.navigator.platform&&/iP(hone|od|ad)/.test(window.navigator.platform)){var t=e.renderImageToCanvas;e.detectSubsampling=function(e){var t,i;return e.width*e.height>1048576&&((t=document.createElement("canvas")).width=t.height=1,(i=t.getContext("2d")).drawImage(e,1-e.width,0),0===i.getImageData(0,0,1,1).data[3])},e.detectVerticalSquash=function(e,t){var i,a,n,r,o=e.naturalHeight||e.height,s=document.createElement("canvas"),d=s.getContext("2d");for(t&&(o/=2),s.width=1,s.height=o,d.drawImage(e,0,0),i=d.getImageData(0,0,1,o).data,a=0,n=o,r=o;r>a;)0===i[4*(r-1)+3]?n=r:a=r,r=n+a>>1;return r/o||1},e.renderImageToCanvas=function(i,a,n,r,o,s,d,l,c,u){if("image/jpeg"===a._type){var g,f,h,m,p=i.getContext("2d"),S=document.createElement("canvas"),b=1024,v=S.getContext("2d");if(S.width=b,S.height=b,p.save(),(g=e.detectSubsampling(a))&&(n/=2,r/=2,o/=2,s/=2),f=e.detectVerticalSquash(a,g),g||1!==f){for(r*=f,c=Math.ceil(b*c/o),u=Math.ceil(b*u/s/f),l=0,m=0;s>m;){for(d=0,h=0;o>h;)v.clearRect(0,0,b,b),v.drawImage(a,n,r,o,s,-h,-m,o,s),p.drawImage(S,0,0,b,b,d,l,c,u),h+=b,d+=c;m+=b,l+=u}return p.restore(),i}}return t(i,a,n,r,o,s,d,l,c,u)}}})),function(e){"use strict";"function"==typeof define&&define.amd?define(["load-image"],e):e(window.loadImage)}((function(e){"use strict";var t=e.hasCanvasOption;e.hasCanvasOption=function(e){return t(e)||e.orientation},e.transformCoordinates=function(e,t){var i=e.getContext("2d"),a=e.width,n=e.height,r=t.orientation;if(r)switch(r>4&&(e.width=n,e.height=a),r){case 2:i.translate(a,0),i.scale(-1,1);break;case 3:i.translate(a,n),i.rotate(Math.PI);break;case 4:i.translate(0,n),i.scale(1,-1);break;case 5:i.rotate(.5*Math.PI),i.scale(1,-1);break;case 6:i.rotate(.5*Math.PI),i.translate(0,-n);break;case 7:i.rotate(.5*Math.PI),i.translate(a,-n),i.scale(-1,1);break;case 8:i.rotate(-.5*Math.PI),i.translate(-a,0)}},e.getTransformedOptions=function(e){if(!e.orientation||1===e.orientation)return e;var t,i={};for(t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);switch(e.orientation){case 2:i.left=e.right,i.right=e.left;break;case 3:i.left=e.right,i.top=e.bottom,i.right=e.left,i.bottom=e.top;break;case 4:i.top=e.bottom,i.bottom=e.top;break;case 5:i.left=e.top,i.top=e.left,i.right=e.bottom,i.bottom=e.right;break;case 6:i.left=e.top,i.top=e.right,i.right=e.bottom,i.bottom=e.left;break;case 7:i.left=e.bottom,i.top=e.right,i.right=e.top,i.bottom=e.left;break;case 8:i.left=e.bottom,i.top=e.left,i.right=e.top,i.bottom=e.right}return e.orientation>4&&(i.maxWidth=e.maxHeight,i.maxHeight=e.maxWidth,i.minWidth=e.minHeight,i.minHeight=e.minWidth,i.sourceWidth=e.sourceHeight,i.sourceHeight=e.sourceWidth),i}})),function(e){"use strict";"function"==typeof define&&define.amd?define(["load-image"],e):e(window.loadImage)}((function(e){"use strict";var t=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice);e.blobSlice=t&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},e.metaDataParsers={jpeg:{65505:[]}},e.parseMetaData=function(t,i,a){var n=this,r=(a=a||{}).maxMetaDataSize||262144,o={};(!(window.DataView&&t&&t.size>=12&&"image/jpeg"===t.type&&e.blobSlice)||!e.readFile(e.blobSlice.call(t,0,r),(function(t){if(t.target.error)return console.log(t.target.error),void i(o);var r,s,d,l,c=t.target.result,u=new DataView(c),g=2,f=u.byteLength-4,h=g;if(65496===u.getUint16(0)){for(;f>g&&((r=u.getUint16(g))>=65504&&65519>=r||65534===r);){if(g+(s=u.getUint16(g+2)+2)>u.byteLength){console.log("Invalid meta data: Invalid segment size.");break}if(d=e.metaDataParsers.jpeg[r])for(l=0;l<d.length;l+=1)d[l].call(n,u,g,s,o,a);h=g+=s}!a.disableImageHead&&h>6&&(o.imageHead=c.slice?c.slice(0,h):new Uint8Array(c).subarray(0,h))}else console.log("Invalid JPEG file: Missing JPEG marker.");i(o)}),"readAsArrayBuffer"))&&i(o)}})),function(e){"use strict";"function"==typeof define&&define.amd?define(["load-image","load-image-meta"],e):e(window.loadImage)}((function(e){"use strict";e.ExifMap=function(){return this},e.ExifMap.prototype.map={Orientation:274},e.ExifMap.prototype.get=function(e){return this[e]||this[this.map[e]]},e.getExifThumbnail=function(e,t,i){var a,n,r;if(i&&!(t+i>e.byteLength)){for(a=[],n=0;i>n;n+=1)r=e.getUint8(t+n),a.push((16>r?"0":"")+r.toString(16));return"data:image/jpeg,%"+a.join("%")}console.log("Invalid Exif data: Invalid thumbnail data.")},e.exifTagTypes={1:{getValue:function(e,t){return e.getUint8(t)},size:1},2:{getValue:function(e,t){return String.fromCharCode(e.getUint8(t))},size:1,ascii:!0},3:{getValue:function(e,t,i){return e.getUint16(t,i)},size:2},4:{getValue:function(e,t,i){return e.getUint32(t,i)},size:4},5:{getValue:function(e,t,i){return e.getUint32(t,i)/e.getUint32(t+4,i)},size:8},9:{getValue:function(e,t,i){return e.getInt32(t,i)},size:4},10:{getValue:function(e,t,i){return e.getInt32(t,i)/e.getInt32(t+4,i)},size:8}},e.exifTagTypes[7]=e.exifTagTypes[1],e.getExifValue=function(t,i,a,n,r,o){var s,d,l,c,u,g,f=e.exifTagTypes[n];if(f){if(!((d=(s=f.size*r)>4?i+t.getUint32(a+8,o):a+8)+s>t.byteLength)){if(1===r)return f.getValue(t,d,o);for(l=[],c=0;r>c;c+=1)l[c]=f.getValue(t,d+c*f.size,o);if(f.ascii){for(u="",c=0;c<l.length&&"\0"!==(g=l[c]);c+=1)u+=g;return u}return l}console.log("Invalid Exif data: Invalid data offset.")}else console.log("Invalid Exif data: Invalid tag type.")},e.parseExifTag=function(t,i,a,n,r){var o=t.getUint16(a,n);r.exif[o]=e.getExifValue(t,i,a,t.getUint16(a+2,n),t.getUint32(a+4,n),n)},e.parseExifTags=function(e,t,i,a,n){var r,o,s;if(i+6>e.byteLength)console.log("Invalid Exif data: Invalid directory offset.");else{if(!((o=i+2+12*(r=e.getUint16(i,a)))+4>e.byteLength)){for(s=0;r>s;s+=1)this.parseExifTag(e,t,i+2+12*s,a,n);return e.getUint32(o,a)}console.log("Invalid Exif data: Invalid directory size.")}},e.parseExifData=function(t,i,a,n,r){if(!r.disableExif){var o,s,d,l=i+10;if(1165519206===t.getUint32(i+4)){if(l+8>t.byteLength)return void console.log("Invalid Exif data: Invalid segment size.");if(0!==t.getUint16(i+8))return void console.log("Invalid Exif data: Missing byte alignment offset.");switch(t.getUint16(l)){case 18761:o=!0;break;case 19789:o=!1;break;default:return void console.log("Invalid Exif data: Invalid byte alignment marker.")}if(42!==t.getUint16(l+2,o))return void console.log("Invalid Exif data: Missing TIFF marker.");s=t.getUint32(l+4,o),n.exif=new e.ExifMap,(s=e.parseExifTags(t,l,l+s,o,n))&&!r.disableExifThumbnail&&(d={exif:{}},s=e.parseExifTags(t,l,l+s,o,d),d.exif[513]&&(n.exif.Thumbnail=e.getExifThumbnail(t,l+d.exif[513],d.exif[514]))),n.exif[34665]&&!r.disableExifSub&&e.parseExifTags(t,l,l+n.exif[34665],o,n),n.exif[34853]&&!r.disableExifGps&&e.parseExifTags(t,l,l+n.exif[34853],o,n)}}},e.metaDataParsers.jpeg[65505].push(e.parseExifData)})),function(e){"use strict";"function"==typeof define&&define.amd?define(["load-image","load-image-exif"],e):e(window.loadImage)}((function(e){"use strict";e.ExifMap.prototype.tags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright",36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},e.ExifMap.prototype.stringValues={ExposureProgram:{0:"Undefined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Undefined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"top-left",2:"top-right",3:"bottom-right",4:"bottom-left",5:"left-top",6:"right-top",7:"right-bottom",8:"left-bottom"}},e.ExifMap.prototype.getText=function(e){var t=this.get(e);switch(e){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":case"Orientation":return this.stringValues[e][t];case"ExifVersion":case"FlashpixVersion":return String.fromCharCode(t[0],t[1],t[2],t[3]);case"ComponentsConfiguration":return this.stringValues[e][t[0]]+this.stringValues[e][t[1]]+this.stringValues[e][t[2]]+this.stringValues[e][t[3]];case"GPSVersionID":return t[0]+"."+t[1]+"."+t[2]+"."+t[3]}return String(t)},function(e){var t,i=e.tags,a=e.map;for(t in i)i.hasOwnProperty(t)&&(a[i[t]]=t)}(e.ExifMap.prototype),e.ExifMap.prototype.getAll=function(){var e,t,i={};for(e in this)this.hasOwnProperty(e)&&(t=this.tags[e])&&(i[t]=this.getText(t));return i}}));
|
|
1
|
+
!function(e){"use strict";var t=function(e,i,a){var n,r,o=document.createElement("img");if(o.onerror=i,o.onload=function(){!r||a&&a.noRevoke||t.revokeObjectURL(r),i&&i(t.scale(o,a))},t.isInstanceOf("Blob",e)||t.isInstanceOf("File",e))n=r=t.createObjectURL(e),o._type=e.type;else{if("string"!=typeof e)return!1;n=e,a&&a.crossOrigin&&(o.crossOrigin=a.crossOrigin)}return n?(o.src=n,o):t.readFile(e,function(e){var t=e.target;t&&t.result?o.src=t.result:i&&i(e)})},i=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;t.isInstanceOf=function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"},t.transformCoordinates=function(){},t.getTransformedOptions=function(e){return e},t.renderImageToCanvas=function(e,t,i,a,n,r,o,s,d,l){return e.getContext("2d").drawImage(t,i,a,n,r,o,s,d,l),e},t.hasCanvasOption=function(e){return e.canvas||e.crop},t.scale=function(e,i){i=i||{};var a,n,r,o,s,d,l,c,u,g=document.createElement("canvas"),f=e.getContext||t.hasCanvasOption(i)&&g.getContext,h=e.naturalWidth||e.width,m=e.naturalHeight||e.height,p=h,S=m,b=function(){var e=Math.max((r||p)/p,(o||S)/S);e>1&&(p=Math.ceil(p*e),S=Math.ceil(S*e))},v=function(){var e=Math.min((a||p)/p,(n||S)/S);1>e&&(p=Math.ceil(p*e),S=Math.ceil(S*e))};return f&&(l=(i=t.getTransformedOptions(i)).left||0,c=i.top||0,i.sourceWidth?(s=i.sourceWidth,void 0!==i.right&&void 0===i.left&&(l=h-s-i.right)):s=h-l-(i.right||0),i.sourceHeight?(d=i.sourceHeight,void 0!==i.bottom&&void 0===i.top&&(c=m-d-i.bottom)):d=m-c-(i.bottom||0),p=s,S=d),a=i.maxWidth,n=i.maxHeight,r=i.minWidth,o=i.minHeight,f&&a&&n&&i.crop?(p=a,S=n,0>(u=s/d-a/n)?(d=n*s/a,void 0===i.top&&void 0===i.bottom&&(c=(m-d)/2)):u>0&&(s=a*d/n,void 0===i.left&&void 0===i.right&&(l=(h-s)/2))):((i.contain||i.cover)&&(r=a=a||r,o=n=n||o),i.cover?(v(),b()):(b(),v())),f?(g.width=p,g.height=S,t.transformCoordinates(g,i),t.renderImageToCanvas(g,e,l,c,s,d,0,0,p,S)):(e.width=p,e.height=S,e)},t.createObjectURL=function(e){return!!i&&i.createObjectURL(e)},t.revokeObjectURL=function(e){return!!i&&i.revokeObjectURL(e)},t.readFile=function(e,t,i){if(window.FileReader){var a=new FileReader;if(a.onload=a.onerror=t,a[i=i||"readAsDataURL"])return a[i](e),a}return!1},"function"==typeof define&&define.amd?define(function(){return t}):e.loadImage=t}(this),function(e){"use strict";"function"==typeof define&&define.amd?define(["load-image"],e):e(window.loadImage)}(function(e){"use strict";if(window.navigator&&window.navigator.platform&&/iP(hone|od|ad)/.test(window.navigator.platform)){var t=e.renderImageToCanvas;e.detectSubsampling=function(e){var t,i;return e.width*e.height>1048576&&((t=document.createElement("canvas")).width=t.height=1,(i=t.getContext("2d")).drawImage(e,1-e.width,0),0===i.getImageData(0,0,1,1).data[3])},e.detectVerticalSquash=function(e,t){var i,a,n,r,o=e.naturalHeight||e.height,s=document.createElement("canvas"),d=s.getContext("2d");for(t&&(o/=2),s.width=1,s.height=o,d.drawImage(e,0,0),i=d.getImageData(0,0,1,o).data,a=0,n=o,r=o;r>a;)0===i[4*(r-1)+3]?n=r:a=r,r=n+a>>1;return r/o||1},e.renderImageToCanvas=function(i,a,n,r,o,s,d,l,c,u){if("image/jpeg"===a._type){var g,f,h,m,p=i.getContext("2d"),S=document.createElement("canvas"),b=1024,v=S.getContext("2d");if(S.width=b,S.height=b,p.save(),(g=e.detectSubsampling(a))&&(n/=2,r/=2,o/=2,s/=2),f=e.detectVerticalSquash(a,g),g||1!==f){for(r*=f,c=Math.ceil(b*c/o),u=Math.ceil(b*u/s/f),l=0,m=0;s>m;){for(d=0,h=0;o>h;)v.clearRect(0,0,b,b),v.drawImage(a,n,r,o,s,-h,-m,o,s),p.drawImage(S,0,0,b,b,d,l,c,u),h+=b,d+=c;m+=b,l+=u}return p.restore(),i}}return t(i,a,n,r,o,s,d,l,c,u)}}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["load-image"],e):e(window.loadImage)}(function(e){"use strict";var t=e.hasCanvasOption;e.hasCanvasOption=function(e){return t(e)||e.orientation},e.transformCoordinates=function(e,t){var i=e.getContext("2d"),a=e.width,n=e.height,r=t.orientation;if(r)switch(r>4&&(e.width=n,e.height=a),r){case 2:i.translate(a,0),i.scale(-1,1);break;case 3:i.translate(a,n),i.rotate(Math.PI);break;case 4:i.translate(0,n),i.scale(1,-1);break;case 5:i.rotate(.5*Math.PI),i.scale(1,-1);break;case 6:i.rotate(.5*Math.PI),i.translate(0,-n);break;case 7:i.rotate(.5*Math.PI),i.translate(a,-n),i.scale(-1,1);break;case 8:i.rotate(-.5*Math.PI),i.translate(-a,0)}},e.getTransformedOptions=function(e){if(!e.orientation||1===e.orientation)return e;var t,i={};for(t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);switch(e.orientation){case 2:i.left=e.right,i.right=e.left;break;case 3:i.left=e.right,i.top=e.bottom,i.right=e.left,i.bottom=e.top;break;case 4:i.top=e.bottom,i.bottom=e.top;break;case 5:i.left=e.top,i.top=e.left,i.right=e.bottom,i.bottom=e.right;break;case 6:i.left=e.top,i.top=e.right,i.right=e.bottom,i.bottom=e.left;break;case 7:i.left=e.bottom,i.top=e.right,i.right=e.top,i.bottom=e.left;break;case 8:i.left=e.bottom,i.top=e.left,i.right=e.top,i.bottom=e.right}return e.orientation>4&&(i.maxWidth=e.maxHeight,i.maxHeight=e.maxWidth,i.minWidth=e.minHeight,i.minHeight=e.minWidth,i.sourceWidth=e.sourceHeight,i.sourceHeight=e.sourceWidth),i}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["load-image"],e):e(window.loadImage)}(function(e){"use strict";var t=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice);e.blobSlice=t&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},e.metaDataParsers={jpeg:{65505:[]}},e.parseMetaData=function(t,i,a){var n=this,r=(a=a||{}).maxMetaDataSize||262144,o={};(!(window.DataView&&t&&t.size>=12&&"image/jpeg"===t.type&&e.blobSlice)||!e.readFile(e.blobSlice.call(t,0,r),function(t){if(t.target.error)return console.log(t.target.error),void i(o);var r,s,d,l,c=t.target.result,u=new DataView(c),g=2,f=u.byteLength-4,h=g;if(65496===u.getUint16(0)){for(;f>g&&((r=u.getUint16(g))>=65504&&65519>=r||65534===r);){if(g+(s=u.getUint16(g+2)+2)>u.byteLength){console.log("Invalid meta data: Invalid segment size.");break}if(d=e.metaDataParsers.jpeg[r])for(l=0;l<d.length;l+=1)d[l].call(n,u,g,s,o,a);h=g+=s}!a.disableImageHead&&h>6&&(o.imageHead=c.slice?c.slice(0,h):new Uint8Array(c).subarray(0,h))}else console.log("Invalid JPEG file: Missing JPEG marker.");i(o)},"readAsArrayBuffer"))&&i(o)}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["load-image","load-image-meta"],e):e(window.loadImage)}(function(e){"use strict";e.ExifMap=function(){return this},e.ExifMap.prototype.map={Orientation:274},e.ExifMap.prototype.get=function(e){return this[e]||this[this.map[e]]},e.getExifThumbnail=function(e,t,i){var a,n,r;if(i&&!(t+i>e.byteLength)){for(a=[],n=0;i>n;n+=1)r=e.getUint8(t+n),a.push((16>r?"0":"")+r.toString(16));return"data:image/jpeg,%"+a.join("%")}console.log("Invalid Exif data: Invalid thumbnail data.")},e.exifTagTypes={1:{getValue:function(e,t){return e.getUint8(t)},size:1},2:{getValue:function(e,t){return String.fromCharCode(e.getUint8(t))},size:1,ascii:!0},3:{getValue:function(e,t,i){return e.getUint16(t,i)},size:2},4:{getValue:function(e,t,i){return e.getUint32(t,i)},size:4},5:{getValue:function(e,t,i){return e.getUint32(t,i)/e.getUint32(t+4,i)},size:8},9:{getValue:function(e,t,i){return e.getInt32(t,i)},size:4},10:{getValue:function(e,t,i){return e.getInt32(t,i)/e.getInt32(t+4,i)},size:8}},e.exifTagTypes[7]=e.exifTagTypes[1],e.getExifValue=function(t,i,a,n,r,o){var s,d,l,c,u,g,f=e.exifTagTypes[n];if(f){if(!((d=(s=f.size*r)>4?i+t.getUint32(a+8,o):a+8)+s>t.byteLength)){if(1===r)return f.getValue(t,d,o);for(l=[],c=0;r>c;c+=1)l[c]=f.getValue(t,d+c*f.size,o);if(f.ascii){for(u="",c=0;c<l.length&&"\0"!==(g=l[c]);c+=1)u+=g;return u}return l}console.log("Invalid Exif data: Invalid data offset.")}else console.log("Invalid Exif data: Invalid tag type.")},e.parseExifTag=function(t,i,a,n,r){var o=t.getUint16(a,n);r.exif[o]=e.getExifValue(t,i,a,t.getUint16(a+2,n),t.getUint32(a+4,n),n)},e.parseExifTags=function(e,t,i,a,n){var r,o,s;if(i+6>e.byteLength)console.log("Invalid Exif data: Invalid directory offset.");else{if(!((o=i+2+12*(r=e.getUint16(i,a)))+4>e.byteLength)){for(s=0;r>s;s+=1)this.parseExifTag(e,t,i+2+12*s,a,n);return e.getUint32(o,a)}console.log("Invalid Exif data: Invalid directory size.")}},e.parseExifData=function(t,i,a,n,r){if(!r.disableExif){var o,s,d,l=i+10;if(1165519206===t.getUint32(i+4)){if(l+8>t.byteLength)return void console.log("Invalid Exif data: Invalid segment size.");if(0!==t.getUint16(i+8))return void console.log("Invalid Exif data: Missing byte alignment offset.");switch(t.getUint16(l)){case 18761:o=!0;break;case 19789:o=!1;break;default:return void console.log("Invalid Exif data: Invalid byte alignment marker.")}if(42!==t.getUint16(l+2,o))return void console.log("Invalid Exif data: Missing TIFF marker.");s=t.getUint32(l+4,o),n.exif=new e.ExifMap,(s=e.parseExifTags(t,l,l+s,o,n))&&!r.disableExifThumbnail&&(d={exif:{}},s=e.parseExifTags(t,l,l+s,o,d),d.exif[513]&&(n.exif.Thumbnail=e.getExifThumbnail(t,l+d.exif[513],d.exif[514]))),n.exif[34665]&&!r.disableExifSub&&e.parseExifTags(t,l,l+n.exif[34665],o,n),n.exif[34853]&&!r.disableExifGps&&e.parseExifTags(t,l,l+n.exif[34853],o,n)}}},e.metaDataParsers.jpeg[65505].push(e.parseExifData)}),function(e){"use strict";"function"==typeof define&&define.amd?define(["load-image","load-image-exif"],e):e(window.loadImage)}(function(e){"use strict";e.ExifMap.prototype.tags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright",36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",42240:"Gamma",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"PhotographicSensitivity",34856:"OECF",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:"LensSpecification",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"},e.ExifMap.prototype.stringValues={ExposureProgram:{0:"Undefined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Undefined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},ComponentsConfiguration:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"},Orientation:{1:"top-left",2:"top-right",3:"bottom-right",4:"bottom-left",5:"left-top",6:"right-top",7:"right-bottom",8:"left-bottom"}},e.ExifMap.prototype.getText=function(e){var t=this.get(e);switch(e){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":case"Orientation":return this.stringValues[e][t];case"ExifVersion":case"FlashpixVersion":return String.fromCharCode(t[0],t[1],t[2],t[3]);case"ComponentsConfiguration":return this.stringValues[e][t[0]]+this.stringValues[e][t[1]]+this.stringValues[e][t[2]]+this.stringValues[e][t[3]];case"GPSVersionID":return t[0]+"."+t[1]+"."+t[2]+"."+t[3]}return String(t)},function(e){var t,i=e.tags,a=e.map;for(t in i)i.hasOwnProperty(t)&&(a[i[t]]=t)}(e.ExifMap.prototype),e.ExifMap.prototype.getAll=function(){var e,t,i={};for(e in this)this.hasOwnProperty(e)&&(t=this.tags[e])&&(i[t]=this.getText(t));return i}});
|
|
@@ -3,18 +3,27 @@
|
|
|
3
3
|
|
|
4
4
|
{% block filter_form %}
|
|
5
5
|
<form data-chooser-modal-search action="{{ results_url }}" method="GET" autocomplete="off" novalidate>
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
<div class="md:w-flex w-gap-8">
|
|
7
|
+
<ul class="fields w-grow">
|
|
8
|
+
{% for field in filter_form %}
|
|
9
|
+
<li>{% formattedfield field %}</li>
|
|
10
|
+
{% endfor %}
|
|
11
|
+
{% if popular_tags %}
|
|
12
|
+
<li class="taglist w-label-3">
|
|
13
|
+
<h3>{% trans 'Popular tags' %}</h3>
|
|
14
|
+
{% for tag in popular_tags %}
|
|
15
|
+
<a class="suggested-tag tag" href="{% url 'wagtailimages:index' %}?tag={{ tag.name|urlencode }}">{{ tag.name }}</a>
|
|
16
|
+
{% endfor %}
|
|
17
|
+
</li>
|
|
18
|
+
{% endif %}
|
|
19
|
+
</ul>
|
|
20
|
+
<fieldset class="w-pb-0">
|
|
21
|
+
<legend class="w-field__label w-mb-2">{% trans 'Layout' %}</legend>
|
|
22
|
+
<div id="layout-switch-control" class="w-layout-switch-control w-mb-8" data-chooser-modal-search-filter>
|
|
23
|
+
{% include "wagtailimages/images/layout_toggle_button.html" %}
|
|
24
|
+
</div>
|
|
25
|
+
</fieldset>
|
|
26
|
+
</div>
|
|
19
27
|
</form>
|
|
28
|
+
|
|
20
29
|
{% endblock %}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{% load wagtailadmin_tags %}
|
|
2
|
+
{% load wagtailimages_tags %}
|
|
3
|
+
|
|
4
|
+
<td {% if column.classname %}class="{{ column.classname }}"{% endif %}>
|
|
5
|
+
<a data-chooser-modal-choice class="image-choice--list" href="{{ instance.chosen_url }}">
|
|
6
|
+
<div class="image">
|
|
7
|
+
{% image instance max-165x165 class="show-transparency" %}
|
|
8
|
+
</div>
|
|
9
|
+
</a>
|
|
10
|
+
</td>
|